From bed5299c4a62a85712dec9563b49b75d27ae0d40 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 15 Apr 2021 03:35:09 +0000 Subject: [PATCH] CodeGen from PR 13909 in Azure/azure-rest-api-specs web readme t2 config (#13909) * web readme t2 config * web readme.python t2 config --- sdk/appservice/azure-mgmt-web/MANIFEST.in | 1 + sdk/appservice/azure-mgmt-web/_meta.json | 8 + .../azure/mgmt/web/_configuration.py | 7 +- .../azure/mgmt/web/_operations_mixin.py | 82 +- .../mgmt/web/_web_site_management_client.py | 104 +- .../azure/mgmt/web/aio/_configuration.py | 9 +- .../azure/mgmt/web/aio/_operations_mixin.py | 82 +- .../web/aio/_web_site_management_client.py | 106 +- .../azure-mgmt-web/azure/mgmt/web/models.py | 2 +- .../azure/mgmt/web/v2015_04_01/__init__.py | 3 + .../mgmt/web/v2015_04_01/_configuration.py | 3 +- .../azure/mgmt/web/v2015_04_01/_metadata.json | 62 +- .../azure/mgmt/web/v2015_04_01/_version.py | 9 + .../_web_site_management_client.py | 19 + .../web/v2015_04_01/aio/_configuration.py | 3 +- .../aio/_web_site_management_client.py | 18 + .../aio/operations/_domains_operations.py | 14 +- .../mgmt/web/v2015_04_01/models/_models.py | 4 +- .../web/v2015_04_01/models/_models_py3.py | 4 +- .../operations/_domains_operations.py | 14 +- .../azure/mgmt/web/v2015_08_01/__init__.py | 3 + .../mgmt/web/v2015_08_01/_configuration.py | 3 +- .../azure/mgmt/web/v2015_08_01/_metadata.json | 62 +- .../azure/mgmt/web/v2015_08_01/_version.py | 9 + .../_web_site_management_client.py | 19 + .../web/v2015_08_01/aio/_configuration.py | 3 +- .../aio/_web_site_management_client.py | 18 + ...p_service_certificate_orders_operations.py | 8 +- ...p_service_certificate_orders_operations.py | 8 +- .../azure/mgmt/web/v2016_03_01/__init__.py | 3 + .../mgmt/web/v2016_03_01/_configuration.py | 3 +- .../azure/mgmt/web/v2016_03_01/_metadata.json | 422 +- .../azure/mgmt/web/v2016_03_01/_version.py | 9 + .../_web_site_management_client.py | 19 + .../web/v2016_03_01/aio/_configuration.py | 3 +- .../aio/_web_site_management_client.py | 18 + .../_resource_health_metadata_operations.py | 12 +- .../mgmt/web/v2016_03_01/models/_models.py | 8 +- .../web/v2016_03_01/models/_models_py3.py | 8 +- .../_resource_health_metadata_operations.py | 12 +- .../azure/mgmt/web/v2016_08_01/__init__.py | 3 + .../mgmt/web/v2016_08_01/_configuration.py | 3 +- .../azure/mgmt/web/v2016_08_01/_metadata.json | 62 +- .../azure/mgmt/web/v2016_08_01/_version.py | 9 + .../_web_site_management_client.py | 19 + .../web/v2016_08_01/aio/_configuration.py | 3 +- .../aio/_web_site_management_client.py | 18 + .../aio/operations/_web_apps_operations.py | 88 +- .../mgmt/web/v2016_08_01/models/_models.py | 16 +- .../web/v2016_08_01/models/_models_py3.py | 16 +- .../operations/_web_apps_operations.py | 88 +- .../azure/mgmt/web/v2016_09_01/__init__.py | 3 + .../mgmt/web/v2016_09_01/_configuration.py | 3 +- .../azure/mgmt/web/v2016_09_01/_metadata.json | 62 +- .../azure/mgmt/web/v2016_09_01/_version.py | 9 + .../_web_site_management_client.py | 19 + .../web/v2016_09_01/aio/_configuration.py | 3 +- .../aio/_web_site_management_client.py | 18 + .../_app_service_environments_operations.py | 24 +- .../_app_service_plans_operations.py | 4 +- .../mgmt/web/v2016_09_01/models/_models.py | 8 +- .../web/v2016_09_01/models/_models_py3.py | 8 +- .../_app_service_environments_operations.py | 24 +- .../_app_service_plans_operations.py | 4 +- .../azure/mgmt/web/v2018_02_01/__init__.py | 3 + .../mgmt/web/v2018_02_01/_configuration.py | 3 +- .../azure/mgmt/web/v2018_02_01/_metadata.json | 470 +- .../azure/mgmt/web/v2018_02_01/_version.py | 9 + .../_web_site_management_client.py | 19 + .../web/v2018_02_01/aio/_configuration.py | 3 +- .../aio/_web_site_management_client.py | 18 + ...p_service_certificate_orders_operations.py | 32 +- .../_app_service_environments_operations.py | 102 +- .../_app_service_plans_operations.py | 42 +- ...ficate_registration_provider_operations.py | 2 +- .../operations/_certificates_operations.py | 10 +- .../_deleted_web_apps_operations.py | 6 +- .../aio/operations/_diagnostics_operations.py | 44 +- ...domain_registration_provider_operations.py | 2 +- .../aio/operations/_domains_operations.py | 36 +- .../aio/operations/_provider_operations.py | 6 +- .../operations/_recommendations_operations.py | 14 +- .../_resource_health_metadata_operations.py | 12 +- .../_top_level_domains_operations.py | 6 +- .../aio/operations/_web_apps_operations.py | 564 +- .../_web_site_management_client_operations.py | 30 +- .../mgmt/web/v2018_02_01/models/_models.py | 20 +- .../web/v2018_02_01/models/_models_py3.py | 20 +- ...p_service_certificate_orders_operations.py | 32 +- .../_app_service_environments_operations.py | 102 +- .../_app_service_plans_operations.py | 42 +- ...ficate_registration_provider_operations.py | 2 +- .../operations/_certificates_operations.py | 10 +- .../_deleted_web_apps_operations.py | 6 +- .../operations/_diagnostics_operations.py | 44 +- ...domain_registration_provider_operations.py | 2 +- .../operations/_domains_operations.py | 36 +- .../operations/_provider_operations.py | 6 +- .../operations/_recommendations_operations.py | 14 +- .../_resource_health_metadata_operations.py | 12 +- .../_top_level_domains_operations.py | 6 +- .../operations/_web_apps_operations.py | 564 +- .../_web_site_management_client_operations.py | 30 +- .../azure/mgmt/web/v2018_11_01/__init__.py | 3 + .../mgmt/web/v2018_11_01/_configuration.py | 3 +- .../azure/mgmt/web/v2018_11_01/_metadata.json | 62 +- .../azure/mgmt/web/v2018_11_01/_version.py | 9 + .../_web_site_management_client.py | 19 + .../web/v2018_11_01/aio/_configuration.py | 3 +- .../aio/_web_site_management_client.py | 18 + .../operations/_certificates_operations.py | 10 +- .../operations/_certificates_operations.py | 10 +- .../azure/mgmt/web/v2019_08_01/__init__.py | 3 + .../mgmt/web/v2019_08_01/_configuration.py | 3 +- .../azure/mgmt/web/v2019_08_01/_metadata.json | 446 +- .../azure/mgmt/web/v2019_08_01/_version.py | 9 + .../_web_site_management_client.py | 19 + .../web/v2019_08_01/aio/_configuration.py | 3 +- .../aio/_web_site_management_client.py | 18 + ...p_service_certificate_orders_operations.py | 48 +- .../_app_service_environments_operations.py | 106 +- .../_app_service_plans_operations.py | 58 +- ...ficate_registration_provider_operations.py | 2 +- .../operations/_certificates_operations.py | 12 +- .../_deleted_web_apps_operations.py | 6 +- .../aio/operations/_diagnostics_operations.py | 44 +- ...domain_registration_provider_operations.py | 2 +- .../aio/operations/_domains_operations.py | 42 +- .../aio/operations/_provider_operations.py | 6 +- .../operations/_recommendations_operations.py | 30 +- .../_resource_health_metadata_operations.py | 12 +- .../operations/_static_sites_operations.py | 52 +- .../_top_level_domains_operations.py | 6 +- .../aio/operations/_web_apps_operations.py | 872 +- .../_web_site_management_client_operations.py | 32 +- .../mgmt/web/v2019_08_01/models/_models.py | 28 +- .../web/v2019_08_01/models/_models_py3.py | 28 +- ...p_service_certificate_orders_operations.py | 48 +- .../_app_service_environments_operations.py | 106 +- .../_app_service_plans_operations.py | 58 +- ...ficate_registration_provider_operations.py | 2 +- .../operations/_certificates_operations.py | 12 +- .../_deleted_web_apps_operations.py | 6 +- .../operations/_diagnostics_operations.py | 44 +- ...domain_registration_provider_operations.py | 2 +- .../operations/_domains_operations.py | 42 +- .../operations/_provider_operations.py | 6 +- .../operations/_recommendations_operations.py | 30 +- .../_resource_health_metadata_operations.py | 12 +- .../operations/_static_sites_operations.py | 52 +- .../_top_level_domains_operations.py | 6 +- .../operations/_web_apps_operations.py | 872 +- .../_web_site_management_client_operations.py | 32 +- .../azure/mgmt/web/v2020_06_01/__init__.py | 3 + .../mgmt/web/v2020_06_01/_configuration.py | 3 +- .../azure/mgmt/web/v2020_06_01/_metadata.json | 446 +- .../azure/mgmt/web/v2020_06_01/_version.py | 9 + .../_web_site_management_client.py | 19 + .../web/v2020_06_01/aio/_configuration.py | 3 +- .../aio/_web_site_management_client.py | 18 + ...p_service_certificate_orders_operations.py | 48 +- .../_app_service_environments_operations.py | 106 +- .../_app_service_plans_operations.py | 58 +- ...ficate_registration_provider_operations.py | 2 +- .../operations/_certificates_operations.py | 12 +- .../_deleted_web_apps_operations.py | 6 +- .../aio/operations/_diagnostics_operations.py | 44 +- ...domain_registration_provider_operations.py | 2 +- .../aio/operations/_domains_operations.py | 42 +- .../aio/operations/_provider_operations.py | 6 +- .../operations/_recommendations_operations.py | 30 +- .../_resource_health_metadata_operations.py | 12 +- .../operations/_static_sites_operations.py | 54 +- .../_top_level_domains_operations.py | 6 +- .../aio/operations/_web_apps_operations.py | 876 +- .../_web_site_management_client_operations.py | 32 +- .../mgmt/web/v2020_06_01/models/_models.py | 36 +- .../web/v2020_06_01/models/_models_py3.py | 36 +- ...p_service_certificate_orders_operations.py | 48 +- .../_app_service_environments_operations.py | 106 +- .../_app_service_plans_operations.py | 58 +- ...ficate_registration_provider_operations.py | 2 +- .../operations/_certificates_operations.py | 12 +- .../_deleted_web_apps_operations.py | 6 +- .../operations/_diagnostics_operations.py | 44 +- ...domain_registration_provider_operations.py | 2 +- .../operations/_domains_operations.py | 42 +- .../operations/_provider_operations.py | 6 +- .../operations/_recommendations_operations.py | 30 +- .../_resource_health_metadata_operations.py | 12 +- .../operations/_static_sites_operations.py | 54 +- .../_top_level_domains_operations.py | 6 +- .../operations/_web_apps_operations.py | 876 +- .../_web_site_management_client_operations.py | 32 +- .../azure/mgmt/web/v2020_09_01/__init__.py | 3 + .../mgmt/web/v2020_09_01/_configuration.py | 3 +- .../azure/mgmt/web/v2020_09_01/_metadata.json | 470 +- .../azure/mgmt/web/v2020_09_01/_version.py | 9 + .../_web_site_management_client.py | 19 + .../web/v2020_09_01/aio/_configuration.py | 3 +- .../aio/_web_site_management_client.py | 18 + ...p_service_certificate_orders_operations.py | 48 +- .../_app_service_environments_operations.py | 106 +- .../_app_service_plans_operations.py | 58 +- ...ficate_registration_provider_operations.py | 2 +- .../operations/_certificates_operations.py | 12 +- .../_deleted_web_apps_operations.py | 6 +- .../aio/operations/_diagnostics_operations.py | 44 +- ...domain_registration_provider_operations.py | 2 +- .../aio/operations/_domains_operations.py | 42 +- .../aio/operations/_provider_operations.py | 6 +- .../operations/_recommendations_operations.py | 30 +- .../_resource_health_metadata_operations.py | 12 +- .../operations/_static_sites_operations.py | 54 +- .../_top_level_domains_operations.py | 6 +- .../aio/operations/_web_apps_operations.py | 876 +- .../_web_site_management_client_operations.py | 34 +- .../mgmt/web/v2020_09_01/models/_models.py | 36 +- .../web/v2020_09_01/models/_models_py3.py | 36 +- ...p_service_certificate_orders_operations.py | 48 +- .../_app_service_environments_operations.py | 106 +- .../_app_service_plans_operations.py | 58 +- ...ficate_registration_provider_operations.py | 2 +- .../operations/_certificates_operations.py | 12 +- .../_deleted_web_apps_operations.py | 6 +- .../operations/_diagnostics_operations.py | 44 +- ...domain_registration_provider_operations.py | 2 +- .../operations/_domains_operations.py | 42 +- .../operations/_provider_operations.py | 6 +- .../operations/_recommendations_operations.py | 30 +- .../_resource_health_metadata_operations.py | 12 +- .../operations/_static_sites_operations.py | 54 +- .../_top_level_domains_operations.py | 6 +- .../operations/_web_apps_operations.py | 876 +- .../_web_site_management_client_operations.py | 34 +- .../azure/mgmt/web/v2020_12_01/__init__.py | 19 + .../mgmt/web/v2020_12_01/_configuration.py | 71 + .../azure/mgmt/web/v2020_12_01/_metadata.json | 329 + .../azure/mgmt/web/v2020_12_01/_version.py | 9 + .../_web_site_management_client.py | 170 + .../mgmt/web/v2020_12_01/aio/__init__.py | 10 + .../web/v2020_12_01/aio/_configuration.py | 67 + .../aio/_web_site_management_client.py | 163 + .../v2020_12_01/aio/operations/__init__.py | 47 + ...p_service_certificate_orders_operations.py | 1491 + .../_app_service_environments_operations.py | 3848 ++ .../_app_service_plans_operations.py | 2007 ++ ...rtificate_orders_diagnostics_operations.py | 201 + ...ficate_registration_provider_operations.py | 108 + .../operations/_certificates_operations.py | 447 + .../_deleted_web_apps_operations.py | 245 + .../aio/operations/_diagnostics_operations.py | 1774 + ...domain_registration_provider_operations.py | 108 + .../aio/operations/_domains_operations.py | 1119 + .../operations/_global_model_operations.py | 213 + .../aio/operations/_provider_operations.py | 546 + .../operations/_recommendations_operations.py | 1109 + .../_resource_health_metadata_operations.py | 471 + .../operations/_static_sites_operations.py | 4156 +++ .../_top_level_domains_operations.py | 252 + .../aio/operations/_web_apps_operations.py | 29502 +++++++++++++++ .../_web_site_management_client_operations.py | 1121 + .../mgmt/web/v2020_12_01/models/__init__.py | 1350 + .../mgmt/web/v2020_12_01/models/_models.py | 18795 ++++++++++ .../web/v2020_12_01/models/_models_py3.py | 20772 +++++++++++ .../_web_site_management_client_enums.py | 852 + .../web/v2020_12_01/operations/__init__.py | 47 + ...p_service_certificate_orders_operations.py | 1517 + .../_app_service_environments_operations.py | 3904 ++ .../_app_service_plans_operations.py | 2039 ++ ...rtificate_orders_diagnostics_operations.py | 207 + ...ficate_registration_provider_operations.py | 113 + .../operations/_certificates_operations.py | 457 + .../_deleted_web_apps_operations.py | 252 + .../operations/_diagnostics_operations.py | 1800 + ...domain_registration_provider_operations.py | 113 + .../operations/_domains_operations.py | 1139 + .../operations/_global_model_operations.py | 220 + .../operations/_provider_operations.py | 557 + .../operations/_recommendations_operations.py | 1128 + .../_resource_health_metadata_operations.py | 481 + .../operations/_static_sites_operations.py | 4221 +++ .../_top_level_domains_operations.py | 259 + .../operations/_web_apps_operations.py | 29927 ++++++++++++++++ .../_web_site_management_client_operations.py | 1142 + .../azure/mgmt/web/v2020_12_01/py.typed | 1 + 286 files changed, 148489 insertions(+), 6378 deletions(-) create mode 100644 sdk/appservice/azure-mgmt-web/_meta.json create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/__init__.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_configuration.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_metadata.json create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_version.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_web_site_management_client.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/__init__.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_configuration.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_web_site_management_client.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/__init__.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_certificate_orders_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_environments_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_plans_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_orders_diagnostics_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificates_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_deleted_web_apps_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_diagnostics_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domain_registration_provider_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domains_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_global_model_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_provider_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_recommendations_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_resource_health_metadata_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_static_sites_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_top_level_domains_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_apps_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_site_management_client_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/__init__.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_models.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_models_py3.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_web_site_management_client_enums.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/__init__.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_certificate_orders_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_environments_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_registration_provider_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificates_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_deleted_web_apps_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_diagnostics_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domain_registration_provider_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domains_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_global_model_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_provider_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_recommendations_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_resource_health_metadata_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_static_sites_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_top_level_domains_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_apps_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_site_management_client_operations.py create mode 100644 sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/py.typed diff --git a/sdk/appservice/azure-mgmt-web/MANIFEST.in b/sdk/appservice/azure-mgmt-web/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/appservice/azure-mgmt-web/MANIFEST.in +++ b/sdk/appservice/azure-mgmt-web/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/appservice/azure-mgmt-web/_meta.json b/sdk/appservice/azure-mgmt-web/_meta.json new file mode 100644 index 000000000000..d1b1f8101e9a --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "3.3.0", + "use": "@autorest/python@5.6.6", + "commit": "9d2d7b3f4803b82b4d657341f2852719163b79ad", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/web/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "readme": "specification/web/resource-manager/readme.md" +} \ No newline at end of file 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 f341e491d5ca..263c02270c8c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py @@ -8,7 +8,7 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,6 +16,11 @@ from ._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. 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 4dc9bde189d6..163606aabcf4 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 @@ -39,12 +39,12 @@ def check_name_availability( :param name: Resource name to verify. :type name: str :param type: Resource type used for verification. - :type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes + :type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes :param is_fqdn: Is fully qualified domain name. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('check_name_availability') @@ -58,6 +58,8 @@ def check_name_availability( 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 else: raise ValueError("API version {} does not have operation 'check_name_availability'".format(api_version)) mixin_instance = OperationClass() @@ -84,12 +86,14 @@ def generate_github_access_token_for_appservice_cli_async( :type state: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AppserviceGithubToken, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.AppserviceGithubToken + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppserviceGithubToken :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('generate_github_access_token_for_appservice_cli_async') if 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 else: raise ValueError("API version {} does not have operation 'generate_github_access_token_for_appservice_cli_async'".format(api_version)) mixin_instance = OperationClass() @@ -110,7 +114,7 @@ def get_publishing_user( :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.User + :rtype: ~azure.mgmt.web.v2020_12_01.models.User :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_publishing_user') @@ -124,6 +128,8 @@ def get_publishing_user( 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 else: raise ValueError("API version {} does not have operation 'get_publishing_user'".format(api_version)) mixin_instance = OperationClass() @@ -147,7 +153,7 @@ def get_source_control( :type source_control_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SourceControl, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_source_control') @@ -161,6 +167,8 @@ def get_source_control( 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 else: raise ValueError("API version {} does not have operation 'get_source_control'".format(api_version)) mixin_instance = OperationClass() @@ -181,7 +189,7 @@ def get_subscription_deployment_locations( :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_subscription_deployment_locations') @@ -195,6 +203,8 @@ def get_subscription_deployment_locations( 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 else: raise ValueError("API version {} does not have operation 'get_subscription_deployment_locations'".format(api_version)) mixin_instance = OperationClass() @@ -221,7 +231,7 @@ def list_billing_meters( :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_billing_meters') @@ -233,6 +243,8 @@ def list_billing_meters( 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 else: raise ValueError("API version {} does not have operation 'list_billing_meters'".format(api_version)) mixin_instance = OperationClass() @@ -256,7 +268,7 @@ def list_geo_regions( Description for Get a list of available geographical regions. :param sku: Name of SKU used to filter the regions. - :type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName + :type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only regions that support Linux workers. :type linux_workers_enabled: bool @@ -268,7 +280,7 @@ def list_geo_regions( :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_geo_regions') @@ -282,6 +294,8 @@ def list_geo_regions( 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 else: raise ValueError("API version {} does not have operation 'list_geo_regions'".format(api_version)) mixin_instance = OperationClass() @@ -302,7 +316,7 @@ def list_premier_add_on_offers( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_premier_add_on_offers') @@ -316,6 +330,8 @@ def list_premier_add_on_offers( 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 else: raise ValueError("API version {} does not have operation 'list_premier_add_on_offers'".format(api_version)) mixin_instance = OperationClass() @@ -336,10 +352,10 @@ def list_site_identifiers_assigned_to_host_name( Description for List all apps that are assigned to a hostname. :param name_identifier: Hostname information. - :type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier + :type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IdentifierCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_site_identifiers_assigned_to_host_name') @@ -353,6 +369,8 @@ def list_site_identifiers_assigned_to_host_name( 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 else: raise ValueError("API version {} does not have operation 'list_site_identifiers_assigned_to_host_name'".format(api_version)) mixin_instance = OperationClass() @@ -373,7 +391,7 @@ def list_skus( :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos + :rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_skus') @@ -387,6 +405,8 @@ def list_skus( 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 else: raise ValueError("API version {} does not have operation 'list_skus'".format(api_version)) mixin_instance = OperationClass() @@ -407,7 +427,7 @@ def list_source_controls( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_source_controls') @@ -421,6 +441,8 @@ def list_source_controls( 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 else: raise ValueError("API version {} does not have operation 'list_source_controls'".format(api_version)) mixin_instance = OperationClass() @@ -444,7 +466,7 @@ def move( :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param move_resource_envelope: Object that represents the resource to move. - :type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope + :type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -461,6 +483,8 @@ def move( 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 else: raise ValueError("API version {} does not have operation 'move'".format(api_version)) mixin_instance = OperationClass() @@ -481,10 +505,10 @@ def update_publishing_user( Description for Updates publishing user. :param user_details: Details of publishing user. - :type user_details: ~azure.mgmt.web.v2020_09_01.models.User + :type user_details: ~azure.mgmt.web.v2020_12_01.models.User :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.User + :rtype: ~azure.mgmt.web.v2020_12_01.models.User :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_publishing_user') @@ -498,6 +522,8 @@ def update_publishing_user( 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 else: raise ValueError("API version {} does not have operation 'update_publishing_user'".format(api_version)) mixin_instance = OperationClass() @@ -521,10 +547,10 @@ def update_source_control( :param source_control_type: Type of source control. :type source_control_type: str :param request_message: Source control token information. - :type request_message: ~azure.mgmt.web.v2020_09_01.models.SourceControl + :type request_message: ~azure.mgmt.web.v2020_12_01.models.SourceControl :keyword callable cls: A custom type or function that will be passed the direct response :return: SourceControl, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_source_control') @@ -538,6 +564,8 @@ def update_source_control( 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 else: raise ValueError("API version {} does not have operation 'update_source_control'".format(api_version)) mixin_instance = OperationClass() @@ -561,10 +589,10 @@ def validate( :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param validate_request: Request with the resources to validate. - :type validate_request: ~azure.mgmt.web.v2020_09_01.models.ValidateRequest + :type validate_request: ~azure.mgmt.web.v2020_12_01.models.ValidateRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidateResponse, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse + :rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('validate') @@ -578,6 +606,8 @@ def validate( 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 else: raise ValueError("API version {} does not have operation 'validate'".format(api_version)) mixin_instance = OperationClass() @@ -633,7 +663,7 @@ def validate_move( :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param move_resource_envelope: Object that represents the resource to move. - :type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope + :type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -650,6 +680,8 @@ def validate_move( 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 else: raise ValueError("API version {} does not have operation 'validate_move'".format(api_version)) mixin_instance = OperationClass() @@ -671,10 +703,10 @@ def verify_hosting_environment_vnet( analyzing the Network Security Group rules. :param parameters: VNET information. - :type parameters: ~azure.mgmt.web.v2020_09_01.models.VnetParameters + :type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: VnetValidationFailureDetails, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('verify_hosting_environment_vnet') @@ -688,6 +720,8 @@ def verify_hosting_environment_vnet( 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 else: raise ValueError("API version {} does not have operation 'verify_hosting_environment_vnet'".format(api_version)) mixin_instance = OperationClass() 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 8a2f3426aed5..4de068a4c584 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 @@ -9,13 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import ARMPipelineClient -from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING +from azure.mgmt.core import ARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + from ._configuration import WebSiteManagementClientConfiguration from ._operations_mixin import WebSiteManagementClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -38,15 +48,16 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiCl :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2020-09-01' + DEFAULT_API_VERSION = '2020-12-01' _PROFILE_TAG = "azure.mgmt.web.WebSiteManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -61,9 +72,9 @@ def __init__( self, credential, # type: "TokenCredential" subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + api_version=None, # type: Optional[str] + base_url=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): if not base_url: @@ -93,6 +104,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 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` """ if api_version == '2015-04-01': from .v2015_04_01 import models @@ -124,6 +136,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): 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 raise ValueError("API version {} is not available".format(api_version)) @property @@ -135,6 +150,7 @@ def app_service_certificate_orders(self): * 2019-08-01: :class:`AppServiceCertificateOrdersOperations` * 2020-06-01: :class:`AppServiceCertificateOrdersOperations` * 2020-09-01: :class:`AppServiceCertificateOrdersOperations` + * 2020-12-01: :class:`AppServiceCertificateOrdersOperations` """ api_version = self._get_api_version('app_service_certificate_orders') if api_version == '2015-08-01': @@ -147,6 +163,8 @@ def app_service_certificate_orders(self): 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 else: raise ValueError("API version {} does not have operation group 'app_service_certificate_orders'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -160,6 +178,7 @@ def app_service_environments(self): * 2019-08-01: :class:`AppServiceEnvironmentsOperations` * 2020-06-01: :class:`AppServiceEnvironmentsOperations` * 2020-09-01: :class:`AppServiceEnvironmentsOperations` + * 2020-12-01: :class:`AppServiceEnvironmentsOperations` """ api_version = self._get_api_version('app_service_environments') if api_version == '2016-09-01': @@ -172,6 +191,8 @@ def app_service_environments(self): 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 else: raise ValueError("API version {} does not have operation group 'app_service_environments'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -185,6 +206,7 @@ def app_service_plans(self): * 2019-08-01: :class:`AppServicePlansOperations` * 2020-06-01: :class:`AppServicePlansOperations` * 2020-09-01: :class:`AppServicePlansOperations` + * 2020-12-01: :class:`AppServicePlansOperations` """ api_version = self._get_api_version('app_service_plans') if api_version == '2016-09-01': @@ -197,6 +219,8 @@ def app_service_plans(self): 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 else: raise ValueError("API version {} does not have operation group 'app_service_plans'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -214,6 +238,19 @@ def billing_meters(self): raise ValueError("API version {} does not have operation group 'billing_meters'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def certificate_orders_diagnostics(self): + """Instance depends on the API version: + + * 2020-12-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 + else: + raise ValueError("API version {} does not have operation group 'certificate_orders_diagnostics'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def certificate_registration_provider(self): """Instance depends on the API version: @@ -223,6 +260,7 @@ def certificate_registration_provider(self): * 2019-08-01: :class:`CertificateRegistrationProviderOperations` * 2020-06-01: :class:`CertificateRegistrationProviderOperations` * 2020-09-01: :class:`CertificateRegistrationProviderOperations` + * 2020-12-01: :class:`CertificateRegistrationProviderOperations` """ api_version = self._get_api_version('certificate_registration_provider') if api_version == '2015-08-01': @@ -235,6 +273,8 @@ def certificate_registration_provider(self): 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 else: raise ValueError("API version {} does not have operation group 'certificate_registration_provider'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -249,6 +289,7 @@ def certificates(self): * 2019-08-01: :class:`CertificatesOperations` * 2020-06-01: :class:`CertificatesOperations` * 2020-09-01: :class:`CertificatesOperations` + * 2020-12-01: :class:`CertificatesOperations` """ api_version = self._get_api_version('certificates') if api_version == '2016-03-01': @@ -263,6 +304,8 @@ def certificates(self): 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 else: raise ValueError("API version {} does not have operation group 'certificates'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -276,6 +319,7 @@ def deleted_web_apps(self): * 2019-08-01: :class:`DeletedWebAppsOperations` * 2020-06-01: :class:`DeletedWebAppsOperations` * 2020-09-01: :class:`DeletedWebAppsOperations` + * 2020-12-01: :class:`DeletedWebAppsOperations` """ api_version = self._get_api_version('deleted_web_apps') if api_version == '2016-03-01': @@ -288,6 +332,8 @@ def deleted_web_apps(self): 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 else: raise ValueError("API version {} does not have operation group 'deleted_web_apps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -301,6 +347,7 @@ def diagnostics(self): * 2019-08-01: :class:`DiagnosticsOperations` * 2020-06-01: :class:`DiagnosticsOperations` * 2020-09-01: :class:`DiagnosticsOperations` + * 2020-12-01: :class:`DiagnosticsOperations` """ api_version = self._get_api_version('diagnostics') if api_version == '2016-03-01': @@ -313,6 +360,8 @@ def diagnostics(self): 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 else: raise ValueError("API version {} does not have operation group 'diagnostics'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -326,6 +375,7 @@ def domain_registration_provider(self): * 2019-08-01: :class:`DomainRegistrationProviderOperations` * 2020-06-01: :class:`DomainRegistrationProviderOperations` * 2020-09-01: :class:`DomainRegistrationProviderOperations` + * 2020-12-01: :class:`DomainRegistrationProviderOperations` """ api_version = self._get_api_version('domain_registration_provider') if api_version == '2015-04-01': @@ -338,6 +388,8 @@ def domain_registration_provider(self): 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 else: raise ValueError("API version {} does not have operation group 'domain_registration_provider'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -351,6 +403,7 @@ def domains(self): * 2019-08-01: :class:`DomainsOperations` * 2020-06-01: :class:`DomainsOperations` * 2020-09-01: :class:`DomainsOperations` + * 2020-12-01: :class:`DomainsOperations` """ api_version = self._get_api_version('domains') if api_version == '2015-04-01': @@ -363,10 +416,25 @@ def domains(self): 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 else: raise ValueError("API version {} does not have operation group 'domains'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def global_model(self): + """Instance depends on the API version: + + * 2020-12-01: :class:`GlobalOperations` + """ + api_version = self._get_api_version('global_model') + if api_version == '2020-12-01': + from .v2020_12_01.operations import GlobalOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'global_model'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def provider(self): """Instance depends on the API version: @@ -376,6 +444,7 @@ def provider(self): * 2019-08-01: :class:`ProviderOperations` * 2020-06-01: :class:`ProviderOperations` * 2020-09-01: :class:`ProviderOperations` + * 2020-12-01: :class:`ProviderOperations` """ api_version = self._get_api_version('provider') if api_version == '2016-03-01': @@ -388,6 +457,8 @@ def provider(self): 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 else: raise ValueError("API version {} does not have operation group 'provider'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -401,6 +472,7 @@ def recommendations(self): * 2019-08-01: :class:`RecommendationsOperations` * 2020-06-01: :class:`RecommendationsOperations` * 2020-09-01: :class:`RecommendationsOperations` + * 2020-12-01: :class:`RecommendationsOperations` """ api_version = self._get_api_version('recommendations') if api_version == '2016-03-01': @@ -413,6 +485,8 @@ def recommendations(self): 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 else: raise ValueError("API version {} does not have operation group 'recommendations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -426,6 +500,7 @@ def resource_health_metadata(self): * 2019-08-01: :class:`ResourceHealthMetadataOperations` * 2020-06-01: :class:`ResourceHealthMetadataOperations` * 2020-09-01: :class:`ResourceHealthMetadataOperations` + * 2020-12-01: :class:`ResourceHealthMetadataOperations` """ api_version = self._get_api_version('resource_health_metadata') if api_version == '2016-03-01': @@ -438,6 +513,8 @@ def resource_health_metadata(self): 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 else: raise ValueError("API version {} does not have operation group 'resource_health_metadata'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -449,6 +526,7 @@ def static_sites(self): * 2019-08-01: :class:`StaticSitesOperations` * 2020-06-01: :class:`StaticSitesOperations` * 2020-09-01: :class:`StaticSitesOperations` + * 2020-12-01: :class:`StaticSitesOperations` """ api_version = self._get_api_version('static_sites') if api_version == '2019-08-01': @@ -457,6 +535,8 @@ def static_sites(self): 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 else: raise ValueError("API version {} does not have operation group 'static_sites'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -470,6 +550,7 @@ def top_level_domains(self): * 2019-08-01: :class:`TopLevelDomainsOperations` * 2020-06-01: :class:`TopLevelDomainsOperations` * 2020-09-01: :class:`TopLevelDomainsOperations` + * 2020-12-01: :class:`TopLevelDomainsOperations` """ api_version = self._get_api_version('top_level_domains') if api_version == '2015-04-01': @@ -482,6 +563,8 @@ def top_level_domains(self): 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 else: raise ValueError("API version {} does not have operation group 'top_level_domains'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -495,6 +578,7 @@ def web_apps(self): * 2019-08-01: :class:`WebAppsOperations` * 2020-06-01: :class:`WebAppsOperations` * 2020-09-01: :class:`WebAppsOperations` + * 2020-12-01: :class:`WebAppsOperations` """ api_version = self._get_api_version('web_apps') if api_version == '2016-08-01': @@ -507,6 +591,8 @@ def web_apps(self): 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 else: raise ValueError("API version {} does not have operation group 'web_apps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) 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 f97f7652b879..0f522dd75d9e 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 @@ -8,7 +8,7 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,6 +16,9 @@ from .._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. @@ -31,8 +34,8 @@ class WebSiteManagementClientConfiguration(Configuration): def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str + credential: "AsyncTokenCredential", + subscription_id: str, **kwargs # type: Any ) -> None: if credential is None: 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 c960e8f7d65c..eccaa471b18c 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 @@ -35,12 +35,12 @@ async def check_name_availability( :param name: Resource name to verify. :type name: str :param type: Resource type used for verification. - :type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes + :type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes :param is_fqdn: Is fully qualified domain name. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('check_name_availability') @@ -54,6 +54,8 @@ async def check_name_availability( 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 else: raise ValueError("API version {} does not have operation 'check_name_availability'".format(api_version)) mixin_instance = OperationClass() @@ -80,12 +82,14 @@ async def generate_github_access_token_for_appservice_cli_async( :type state: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AppserviceGithubToken, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.AppserviceGithubToken + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppserviceGithubToken :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('generate_github_access_token_for_appservice_cli_async') if 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 else: raise ValueError("API version {} does not have operation 'generate_github_access_token_for_appservice_cli_async'".format(api_version)) mixin_instance = OperationClass() @@ -106,7 +110,7 @@ async def get_publishing_user( :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.User + :rtype: ~azure.mgmt.web.v2020_12_01.models.User :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_publishing_user') @@ -120,6 +124,8 @@ async def get_publishing_user( 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 else: raise ValueError("API version {} does not have operation 'get_publishing_user'".format(api_version)) mixin_instance = OperationClass() @@ -143,7 +149,7 @@ async def get_source_control( :type source_control_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SourceControl, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_source_control') @@ -157,6 +163,8 @@ async def get_source_control( 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 else: raise ValueError("API version {} does not have operation 'get_source_control'".format(api_version)) mixin_instance = OperationClass() @@ -177,7 +185,7 @@ async def get_subscription_deployment_locations( :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_subscription_deployment_locations') @@ -191,6 +199,8 @@ async def get_subscription_deployment_locations( 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 else: raise ValueError("API version {} does not have operation 'get_subscription_deployment_locations'".format(api_version)) mixin_instance = OperationClass() @@ -217,7 +227,7 @@ def list_billing_meters( :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_billing_meters') @@ -229,6 +239,8 @@ def list_billing_meters( 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 else: raise ValueError("API version {} does not have operation 'list_billing_meters'".format(api_version)) mixin_instance = OperationClass() @@ -252,7 +264,7 @@ def list_geo_regions( Description for Get a list of available geographical regions. :param sku: Name of SKU used to filter the regions. - :type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName + :type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only regions that support Linux workers. :type linux_workers_enabled: bool @@ -264,7 +276,7 @@ def list_geo_regions( :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_geo_regions') @@ -278,6 +290,8 @@ def list_geo_regions( 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 else: raise ValueError("API version {} does not have operation 'list_geo_regions'".format(api_version)) mixin_instance = OperationClass() @@ -298,7 +312,7 @@ def list_premier_add_on_offers( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_premier_add_on_offers') @@ -312,6 +326,8 @@ def list_premier_add_on_offers( 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 else: raise ValueError("API version {} does not have operation 'list_premier_add_on_offers'".format(api_version)) mixin_instance = OperationClass() @@ -332,10 +348,10 @@ def list_site_identifiers_assigned_to_host_name( Description for List all apps that are assigned to a hostname. :param name_identifier: Hostname information. - :type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier + :type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IdentifierCollection or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_site_identifiers_assigned_to_host_name') @@ -349,6 +365,8 @@ def list_site_identifiers_assigned_to_host_name( 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 else: raise ValueError("API version {} does not have operation 'list_site_identifiers_assigned_to_host_name'".format(api_version)) mixin_instance = OperationClass() @@ -369,7 +387,7 @@ async def list_skus( :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos + :rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_skus') @@ -383,6 +401,8 @@ async def list_skus( 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 else: raise ValueError("API version {} does not have operation 'list_skus'".format(api_version)) mixin_instance = OperationClass() @@ -403,7 +423,7 @@ def list_source_controls( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_source_controls') @@ -417,6 +437,8 @@ def list_source_controls( 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 else: raise ValueError("API version {} does not have operation 'list_source_controls'".format(api_version)) mixin_instance = OperationClass() @@ -440,7 +462,7 @@ async def move( :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param move_resource_envelope: Object that represents the resource to move. - :type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope + :type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -457,6 +479,8 @@ async def move( 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 else: raise ValueError("API version {} does not have operation 'move'".format(api_version)) mixin_instance = OperationClass() @@ -477,10 +501,10 @@ async def update_publishing_user( Description for Updates publishing user. :param user_details: Details of publishing user. - :type user_details: ~azure.mgmt.web.v2020_09_01.models.User + :type user_details: ~azure.mgmt.web.v2020_12_01.models.User :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.User + :rtype: ~azure.mgmt.web.v2020_12_01.models.User :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_publishing_user') @@ -494,6 +518,8 @@ async def update_publishing_user( 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 else: raise ValueError("API version {} does not have operation 'update_publishing_user'".format(api_version)) mixin_instance = OperationClass() @@ -517,10 +543,10 @@ async def update_source_control( :param source_control_type: Type of source control. :type source_control_type: str :param request_message: Source control token information. - :type request_message: ~azure.mgmt.web.v2020_09_01.models.SourceControl + :type request_message: ~azure.mgmt.web.v2020_12_01.models.SourceControl :keyword callable cls: A custom type or function that will be passed the direct response :return: SourceControl, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('update_source_control') @@ -534,6 +560,8 @@ async def update_source_control( 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 else: raise ValueError("API version {} does not have operation 'update_source_control'".format(api_version)) mixin_instance = OperationClass() @@ -557,10 +585,10 @@ async def validate( :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param validate_request: Request with the resources to validate. - :type validate_request: ~azure.mgmt.web.v2020_09_01.models.ValidateRequest + :type validate_request: ~azure.mgmt.web.v2020_12_01.models.ValidateRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidateResponse, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse + :rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('validate') @@ -574,6 +602,8 @@ async def validate( 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 else: raise ValueError("API version {} does not have operation 'validate'".format(api_version)) mixin_instance = OperationClass() @@ -629,7 +659,7 @@ async def validate_move( :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param move_resource_envelope: Object that represents the resource to move. - :type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope + :type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -646,6 +676,8 @@ async def validate_move( 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 else: raise ValueError("API version {} does not have operation 'validate_move'".format(api_version)) mixin_instance = OperationClass() @@ -667,10 +699,10 @@ async def verify_hosting_environment_vnet( analyzing the Network Security Group rules. :param parameters: VNET information. - :type parameters: ~azure.mgmt.web.v2020_09_01.models.VnetParameters + :type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: VnetValidationFailureDetails, or the result of cls(response) - :rtype: ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('verify_hosting_environment_vnet') @@ -684,6 +716,8 @@ async def verify_hosting_environment_vnet( 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 else: raise ValueError("API version {} does not have operation 'verify_hosting_environment_vnet'".format(api_version)) mixin_instance = OperationClass() 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 3c0a3f9de7d7..50effdf9e482 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 @@ -9,13 +9,21 @@ # regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Serializer, Deserializer +from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + from ._configuration import WebSiteManagementClientConfiguration from ._operations_mixin import WebSiteManagementClientOperationsMixin + +if TYPE_CHECKING: + # 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." @@ -38,15 +46,16 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiCl :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2020-09-01' + DEFAULT_API_VERSION = '2020-12-01' _PROFILE_TAG = "azure.mgmt.web.WebSiteManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -59,11 +68,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, MultiApiCl def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + credential: "AsyncTokenCredential", + subscription_id: str, + api_version: Optional[str] = None, + base_url: Optional[str] = None, + profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: if not base_url: @@ -93,6 +102,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 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` """ if api_version == '2015-04-01': from ..v2015_04_01 import models @@ -124,6 +134,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): 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 raise ValueError("API version {} is not available".format(api_version)) @property @@ -135,6 +148,7 @@ def app_service_certificate_orders(self): * 2019-08-01: :class:`AppServiceCertificateOrdersOperations` * 2020-06-01: :class:`AppServiceCertificateOrdersOperations` * 2020-09-01: :class:`AppServiceCertificateOrdersOperations` + * 2020-12-01: :class:`AppServiceCertificateOrdersOperations` """ api_version = self._get_api_version('app_service_certificate_orders') if api_version == '2015-08-01': @@ -147,6 +161,8 @@ def app_service_certificate_orders(self): 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 else: raise ValueError("API version {} does not have operation group 'app_service_certificate_orders'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -160,6 +176,7 @@ def app_service_environments(self): * 2019-08-01: :class:`AppServiceEnvironmentsOperations` * 2020-06-01: :class:`AppServiceEnvironmentsOperations` * 2020-09-01: :class:`AppServiceEnvironmentsOperations` + * 2020-12-01: :class:`AppServiceEnvironmentsOperations` """ api_version = self._get_api_version('app_service_environments') if api_version == '2016-09-01': @@ -172,6 +189,8 @@ def app_service_environments(self): 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 else: raise ValueError("API version {} does not have operation group 'app_service_environments'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -185,6 +204,7 @@ def app_service_plans(self): * 2019-08-01: :class:`AppServicePlansOperations` * 2020-06-01: :class:`AppServicePlansOperations` * 2020-09-01: :class:`AppServicePlansOperations` + * 2020-12-01: :class:`AppServicePlansOperations` """ api_version = self._get_api_version('app_service_plans') if api_version == '2016-09-01': @@ -197,6 +217,8 @@ def app_service_plans(self): 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 else: raise ValueError("API version {} does not have operation group 'app_service_plans'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -214,6 +236,19 @@ def billing_meters(self): raise ValueError("API version {} does not have operation group 'billing_meters'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def certificate_orders_diagnostics(self): + """Instance depends on the API version: + + * 2020-12-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 + else: + raise ValueError("API version {} does not have operation group 'certificate_orders_diagnostics'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def certificate_registration_provider(self): """Instance depends on the API version: @@ -223,6 +258,7 @@ def certificate_registration_provider(self): * 2019-08-01: :class:`CertificateRegistrationProviderOperations` * 2020-06-01: :class:`CertificateRegistrationProviderOperations` * 2020-09-01: :class:`CertificateRegistrationProviderOperations` + * 2020-12-01: :class:`CertificateRegistrationProviderOperations` """ api_version = self._get_api_version('certificate_registration_provider') if api_version == '2015-08-01': @@ -235,6 +271,8 @@ def certificate_registration_provider(self): 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 else: raise ValueError("API version {} does not have operation group 'certificate_registration_provider'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -249,6 +287,7 @@ def certificates(self): * 2019-08-01: :class:`CertificatesOperations` * 2020-06-01: :class:`CertificatesOperations` * 2020-09-01: :class:`CertificatesOperations` + * 2020-12-01: :class:`CertificatesOperations` """ api_version = self._get_api_version('certificates') if api_version == '2016-03-01': @@ -263,6 +302,8 @@ def certificates(self): 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 else: raise ValueError("API version {} does not have operation group 'certificates'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -276,6 +317,7 @@ def deleted_web_apps(self): * 2019-08-01: :class:`DeletedWebAppsOperations` * 2020-06-01: :class:`DeletedWebAppsOperations` * 2020-09-01: :class:`DeletedWebAppsOperations` + * 2020-12-01: :class:`DeletedWebAppsOperations` """ api_version = self._get_api_version('deleted_web_apps') if api_version == '2016-03-01': @@ -288,6 +330,8 @@ def deleted_web_apps(self): 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 else: raise ValueError("API version {} does not have operation group 'deleted_web_apps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -301,6 +345,7 @@ def diagnostics(self): * 2019-08-01: :class:`DiagnosticsOperations` * 2020-06-01: :class:`DiagnosticsOperations` * 2020-09-01: :class:`DiagnosticsOperations` + * 2020-12-01: :class:`DiagnosticsOperations` """ api_version = self._get_api_version('diagnostics') if api_version == '2016-03-01': @@ -313,6 +358,8 @@ def diagnostics(self): 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 else: raise ValueError("API version {} does not have operation group 'diagnostics'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -326,6 +373,7 @@ def domain_registration_provider(self): * 2019-08-01: :class:`DomainRegistrationProviderOperations` * 2020-06-01: :class:`DomainRegistrationProviderOperations` * 2020-09-01: :class:`DomainRegistrationProviderOperations` + * 2020-12-01: :class:`DomainRegistrationProviderOperations` """ api_version = self._get_api_version('domain_registration_provider') if api_version == '2015-04-01': @@ -338,6 +386,8 @@ def domain_registration_provider(self): 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 else: raise ValueError("API version {} does not have operation group 'domain_registration_provider'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -351,6 +401,7 @@ def domains(self): * 2019-08-01: :class:`DomainsOperations` * 2020-06-01: :class:`DomainsOperations` * 2020-09-01: :class:`DomainsOperations` + * 2020-12-01: :class:`DomainsOperations` """ api_version = self._get_api_version('domains') if api_version == '2015-04-01': @@ -363,10 +414,25 @@ def domains(self): 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 else: raise ValueError("API version {} does not have operation group 'domains'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def global_model(self): + """Instance depends on the API version: + + * 2020-12-01: :class:`GlobalOperations` + """ + api_version = self._get_api_version('global_model') + if api_version == '2020-12-01': + from ..v2020_12_01.aio.operations import GlobalOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'global_model'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def provider(self): """Instance depends on the API version: @@ -376,6 +442,7 @@ def provider(self): * 2019-08-01: :class:`ProviderOperations` * 2020-06-01: :class:`ProviderOperations` * 2020-09-01: :class:`ProviderOperations` + * 2020-12-01: :class:`ProviderOperations` """ api_version = self._get_api_version('provider') if api_version == '2016-03-01': @@ -388,6 +455,8 @@ def provider(self): 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 else: raise ValueError("API version {} does not have operation group 'provider'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -401,6 +470,7 @@ def recommendations(self): * 2019-08-01: :class:`RecommendationsOperations` * 2020-06-01: :class:`RecommendationsOperations` * 2020-09-01: :class:`RecommendationsOperations` + * 2020-12-01: :class:`RecommendationsOperations` """ api_version = self._get_api_version('recommendations') if api_version == '2016-03-01': @@ -413,6 +483,8 @@ def recommendations(self): 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 else: raise ValueError("API version {} does not have operation group 'recommendations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -426,6 +498,7 @@ def resource_health_metadata(self): * 2019-08-01: :class:`ResourceHealthMetadataOperations` * 2020-06-01: :class:`ResourceHealthMetadataOperations` * 2020-09-01: :class:`ResourceHealthMetadataOperations` + * 2020-12-01: :class:`ResourceHealthMetadataOperations` """ api_version = self._get_api_version('resource_health_metadata') if api_version == '2016-03-01': @@ -438,6 +511,8 @@ def resource_health_metadata(self): 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 else: raise ValueError("API version {} does not have operation group 'resource_health_metadata'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -449,6 +524,7 @@ def static_sites(self): * 2019-08-01: :class:`StaticSitesOperations` * 2020-06-01: :class:`StaticSitesOperations` * 2020-09-01: :class:`StaticSitesOperations` + * 2020-12-01: :class:`StaticSitesOperations` """ api_version = self._get_api_version('static_sites') if api_version == '2019-08-01': @@ -457,6 +533,8 @@ def static_sites(self): 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 else: raise ValueError("API version {} does not have operation group 'static_sites'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -470,6 +548,7 @@ def top_level_domains(self): * 2019-08-01: :class:`TopLevelDomainsOperations` * 2020-06-01: :class:`TopLevelDomainsOperations` * 2020-09-01: :class:`TopLevelDomainsOperations` + * 2020-12-01: :class:`TopLevelDomainsOperations` """ api_version = self._get_api_version('top_level_domains') if api_version == '2015-04-01': @@ -482,6 +561,8 @@ def top_level_domains(self): 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 else: raise ValueError("API version {} does not have operation group 'top_level_domains'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -495,6 +576,7 @@ def web_apps(self): * 2019-08-01: :class:`WebAppsOperations` * 2020-06-01: :class:`WebAppsOperations` * 2020-09-01: :class:`WebAppsOperations` + * 2020-12-01: :class:`WebAppsOperations` """ api_version = self._get_api_version('web_apps') if api_version == '2016-08-01': @@ -507,6 +589,8 @@ def web_apps(self): 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 else: raise ValueError("API version {} does not have operation group 'web_apps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models.py index af31b0624539..f0f487c44009 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models.py @@ -6,4 +6,4 @@ # -------------------------------------------------------------------------- from .v2016_03_01.models import * from .v2018_02_01.models import * -from .v2020_09_01.models import * +from .v2020_12_01.models import * diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/__init__.py index 32779ae9e1b0..45c59c58316a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['WebSiteManagementClient'] try: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_configuration.py index d21cdef02387..0c813892959a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_metadata.json index c0dcacb08948..7809e5818214 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,22 +44,62 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "domains": "DomainsOperations", "top_level_domains": "TopLevelDomainsOperations", "domain_registration_provider": "DomainRegistrationProviderOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_version.py new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_web_site_management_client.py index 7cefb42cf100..9b0630248b65 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_web_site_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import WebSiteManagementClientConfiguration from .operations import DomainsOperations @@ -66,6 +67,24 @@ def __init__( self.domain_registration_provider = DomainRegistrationProviderOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_configuration.py index 05de4e5e0cb5..4ef3d8640866 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_web_site_management_client.py index 37713a67e53c..103e831c25f1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_web_site_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -63,6 +64,23 @@ def __init__( self.domain_registration_provider = DomainRegistrationProviderOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domains_operations.py index 8204e07e4c99..3da095c59d71 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domains_operations.py @@ -510,8 +510,8 @@ async def begin_create_or_update( :type domain: ~azure.mgmt.web.v2015_04_01.models.Domain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Domain or the result of cls(response) @@ -845,10 +845,10 @@ async def create_or_update_ownership_identifier( domain_ownership_identifier: "_models.DomainOwnershipIdentifier", **kwargs ) -> "_models.DomainOwnershipIdentifier": - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Creates an ownership identifier for a domain or updates identifier details for an existing - identifer. + identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -977,10 +977,10 @@ async def update_ownership_identifier( domain_ownership_identifier: "_models.DomainOwnershipIdentifier", **kwargs ) -> "_models.DomainOwnershipIdentifier": - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Creates an ownership identifier for a domain or updates identifier details for an existing - identifer. + identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1092,7 +1092,7 @@ async def renew( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/models/_models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/models/_models.py index b1289c9e9897..774d11870cc8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/models/_models.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/models/_models.py @@ -533,8 +533,8 @@ class DomainControlCenterSsoRequest(msrest.serialization.Model): :vartype url: str :ivar post_parameter_key: Post parameter key. :vartype post_parameter_key: str - :ivar post_parameter_value: Post parameter value. Client should use 'application/x-www-form- - urlencoded' encoding for this value. + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. :vartype post_parameter_value: str """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/models/_models_py3.py index d00ed4bdb982..153c2273e511 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/models/_models_py3.py @@ -599,8 +599,8 @@ class DomainControlCenterSsoRequest(msrest.serialization.Model): :vartype url: str :ivar post_parameter_key: Post parameter key. :vartype post_parameter_key: str - :ivar post_parameter_value: Post parameter value. Client should use 'application/x-www-form- - urlencoded' encoding for this value. + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. :vartype post_parameter_value: str """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domains_operations.py index 6ecac1a03f5b..42837b56ce87 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domains_operations.py @@ -522,8 +522,8 @@ def begin_create_or_update( :type domain: ~azure.mgmt.web.v2015_04_01.models.Domain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Domain or the result of cls(response) @@ -862,10 +862,10 @@ def create_or_update_ownership_identifier( **kwargs # type: Any ): # type: (...) -> "_models.DomainOwnershipIdentifier" - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Creates an ownership identifier for a domain or updates identifier details for an existing - identifer. + identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -996,10 +996,10 @@ def update_ownership_identifier( **kwargs # type: Any ): # type: (...) -> "_models.DomainOwnershipIdentifier" - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Creates an ownership identifier for a domain or updates identifier details for an existing - identifer. + identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1112,7 +1112,7 @@ def renew( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/__init__.py index 32779ae9e1b0..45c59c58316a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['WebSiteManagementClient'] try: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_configuration.py index 8c2d65eb1b5e..ee2eeb612b3a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_metadata.json index 0573e9454c82..c93842923dd3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,21 +44,61 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "app_service_certificate_orders": "AppServiceCertificateOrdersOperations", "certificate_registration_provider": "CertificateRegistrationProviderOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_version.py new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_web_site_management_client.py index 1ee5b598adce..4a82d6b2c7ac 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_web_site_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import WebSiteManagementClientConfiguration from .operations import AppServiceCertificateOrdersOperations @@ -61,6 +62,24 @@ def __init__( self.certificate_registration_provider = CertificateRegistrationProviderOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_configuration.py index bbaa147a6b73..f7000d37df1b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_web_site_management_client.py index ebae2b89ec2c..d73ac385066c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_web_site_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -58,6 +59,23 @@ def __init__( self.certificate_registration_provider = CertificateRegistrationProviderOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_app_service_certificate_orders_operations.py index d6d67d125116..4a71f9c8efd1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_app_service_certificate_orders_operations.py @@ -374,8 +374,8 @@ async def begin_create_or_update( :type certificate_distinguished_name: ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceCertificateOrder or the result of cls(response) @@ -776,8 +776,8 @@ async def begin_create_or_update_certificate( :type key_vault_certificate: ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceCertificateResource or the result of cls(response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_app_service_certificate_orders_operations.py index 8aa742a0d986..541ab63a1283 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_app_service_certificate_orders_operations.py @@ -384,8 +384,8 @@ def begin_create_or_update( :type certificate_distinguished_name: ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceCertificateOrder or the result of cls(response) @@ -792,8 +792,8 @@ def begin_create_or_update_certificate( :type key_vault_certificate: ~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceCertificateResource or the result of cls(response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/__init__.py index 32779ae9e1b0..45c59c58316a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['WebSiteManagementClient'] try: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_configuration.py index f48d49366b26..7c90c5f7b8fc 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_metadata.json index 72f76b1e707f..4f0072d68499 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "certificates": "CertificatesOperations", @@ -61,187 +107,189 @@ "billing_meters": "BillingMetersOperations" }, "operation_mixins": { - "get_publishing_user" : { - "sync": { - "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "update_publishing_user" : { - "sync": { - "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2016_03_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2016_03_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "user_details" - }, - "list_source_controls" : { - "sync": { - "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "get_source_control" : { - "sync": { - "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "source_control_type" - }, - "update_source_control" : { - "sync": { - "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "source_control_type, request_message" - }, - "check_name_availability" : { - "sync": { - "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2016_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2016_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "name, type, is_fqdn" - }, - "get_subscription_deployment_locations" : { - "sync": { - "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "list_geo_regions" : { - "sync": { - "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "sku, linux_workers_enabled" - }, - "list_site_identifiers_assigned_to_host_name" : { - "sync": { - "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2016_03_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2016_03_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "name_identifier" - }, - "list_premier_add_on_offers" : { - "sync": { - "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "list_skus" : { - "sync": { - "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "verify_hosting_environment_vnet" : { - "sync": { - "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2016_03_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2016_03_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "parameters" - }, - "move" : { - "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, move_resource_envelope" - }, - "validate" : { - "sync": { - "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2016_03_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2016_03_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, validate_request" - }, - "validate_move" : { - "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, move_resource_envelope" + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "operations": { + "get_publishing_user" : { + "sync": { + "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "update_publishing_user" : { + "sync": { + "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2016_03_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2016_03_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "user_details" + }, + "list_source_controls" : { + "sync": { + "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "get_source_control" : { + "sync": { + "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type" + }, + "update_source_control" : { + "sync": { + "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type, request_message" + }, + "check_name_availability" : { + "sync": { + "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2016_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2016_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name, type, is_fqdn" + }, + "get_subscription_deployment_locations" : { + "sync": { + "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_geo_regions" : { + "sync": { + "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "sku, linux_workers_enabled" + }, + "list_site_identifiers_assigned_to_host_name" : { + "sync": { + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2016_03_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2016_03_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name_identifier" + }, + "list_premier_add_on_offers" : { + "sync": { + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_skus" : { + "sync": { + "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "verify_hosting_environment_vnet" : { + "sync": { + "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2016_03_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2016_03_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "parameters" + }, + "move" : { + "sync": { + "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + }, + "validate" : { + "sync": { + "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2016_03_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2016_03_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, validate_request" + }, + "validate_move" : { + "sync": { + "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + } } - }, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}" + } } \ No newline at end of file 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 new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_web_site_management_client.py index 6e021e301fae..eccb0f88e56a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_web_site_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import WebSiteManagementClientConfiguration from .operations import CertificatesOperations @@ -86,6 +87,24 @@ def __init__( self.billing_meters = BillingMetersOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_configuration.py index ec6b4f114182..80c223878906 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_web_site_management_client.py index a4d6e17a67db..0aaa1b0b2369 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_web_site_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -83,6 +84,23 @@ def __init__( self.billing_meters = BillingMetersOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_resource_health_metadata_operations.py index ed96d7cbe75f..af4c9aee0f27 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_resource_health_metadata_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -249,7 +249,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -310,7 +310,7 @@ async def get_by_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) @@ -391,7 +391,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -456,7 +456,7 @@ async def get_by_site_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/models/_models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/models/_models.py index 31fb52e61567..21188e3f4169 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/models/_models.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/models/_models.py @@ -1311,8 +1311,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] """ @@ -5692,8 +5692,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/models/_models_py3.py index 3c0773d87a58..220176b79033 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/models/_models_py3.py @@ -1447,8 +1447,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] """ @@ -6335,8 +6335,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_resource_health_metadata_operations.py index ac3b136bc34e..61caa6d7f9a9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_resource_health_metadata_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -256,7 +256,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -318,7 +318,7 @@ def get_by_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) @@ -400,7 +400,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -466,7 +466,7 @@ def get_by_site_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/__init__.py index 32779ae9e1b0..45c59c58316a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['WebSiteManagementClient'] try: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py index 3911ab48338c..34859d13f251 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_metadata.json index 621291c05abe..f34cc4bda42e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,20 +44,60 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "web_apps": "WebAppsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_version.py new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_web_site_management_client.py index 025c3a938760..af97475acc9d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_web_site_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import WebSiteManagementClientConfiguration from .operations import WebAppsOperations @@ -56,6 +57,24 @@ def __init__( self.web_apps = WebAppsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_configuration.py index 4a83888832e6..86a3e099a91f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_web_site_management_client.py index 0abdf804568b..a6a477e93f95 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_web_site_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -53,6 +54,23 @@ def __init__( self.web_apps = WebAppsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/operations/_web_apps_operations.py index f827f0823c28..b09d7b1f4349 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/operations/_web_apps_operations.py @@ -329,8 +329,8 @@ async def begin_create_or_update( :type site_envelope: ~azure.mgmt.web.v2016_08_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) @@ -1139,8 +1139,8 @@ async def begin_restore( :type request: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RestoreResponse or the result of cls(response) @@ -2158,8 +2158,8 @@ async def begin_list_publishing_credentials( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) @@ -4121,8 +4121,8 @@ async def begin_create_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2016_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -4516,8 +4516,8 @@ async def begin_create_function( :type function_envelope: ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -5924,8 +5924,8 @@ async def begin_create_instance_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2016_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -7020,8 +7020,8 @@ async def begin_migrate_storage( :type migration_options: ~azure.mgmt.web.v2016_08_01.models.StorageMigrationOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either StorageMigrationResponse or the result of cls(response) @@ -7147,8 +7147,8 @@ async def begin_migrate_my_sql( :type migration_request_envelope: ~azure.mgmt.web.v2016_08_01.models.MigrateMySqlRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Operation or the result of cls(response) @@ -8896,8 +8896,8 @@ async def begin_recover( :type recovery_entity: ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -9285,8 +9285,8 @@ async def begin_install_site_extension( :type site_extension_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -9652,8 +9652,8 @@ async def begin_create_or_update_slot( :type ttl_in_seconds: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) @@ -10551,8 +10551,8 @@ async def begin_restore_slot( :type request: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RestoreResponse or the result of cls(response) @@ -11647,8 +11647,8 @@ async def begin_list_publishing_credentials_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) @@ -13613,8 +13613,8 @@ async def begin_create_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2016_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -14034,8 +14034,8 @@ async def begin_create_instance_function_slot( :type function_envelope: ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -15537,8 +15537,8 @@ async def begin_create_instance_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2016_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -18437,8 +18437,8 @@ async def begin_recover_slot( :type recovery_entity: ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -18854,8 +18854,8 @@ async def begin_install_site_extension_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -19140,8 +19140,8 @@ async def begin_swap_slot( :type slot_swap_entity: ~azure.mgmt.web.v2016_08_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -19430,8 +19430,8 @@ async def begin_create_or_update_source_control_slot( :type site_source_control: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) @@ -21286,8 +21286,8 @@ async def begin_swap_slot_with_production( :type slot_swap_entity: ~azure.mgmt.web.v2016_08_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -21559,8 +21559,8 @@ async def begin_create_or_update_source_control( :type site_source_control: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/models/_models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/models/_models.py index 1aa1dbe11b02..3945b0c4d32d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/models/_models.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/models/_models.py @@ -846,8 +846,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] """ @@ -4176,8 +4176,8 @@ class SiteAuthSettings(ProxyOnlyResource): When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. - More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect- - discovery-1_0.html. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. :type issuer: str :param allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. Note that the :code:`ClientID` value is always considered @@ -4238,8 +4238,8 @@ class SiteAuthSettings(ProxyOnlyResource): :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. - Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en- - us/library/dn631845.aspx. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. :type microsoft_account_o_auth_scopes: list[str] """ @@ -6513,8 +6513,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/models/_models_py3.py index 7f543c19ab23..a573b9b30dff 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/models/_models_py3.py @@ -940,8 +940,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] """ @@ -4612,8 +4612,8 @@ class SiteAuthSettings(ProxyOnlyResource): When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. - More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect- - discovery-1_0.html. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. :type issuer: str :param allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. Note that the :code:`ClientID` value is always considered @@ -4674,8 +4674,8 @@ class SiteAuthSettings(ProxyOnlyResource): :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. - Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en- - us/library/dn631845.aspx. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. :type microsoft_account_o_auth_scopes: list[str] """ @@ -7243,8 +7243,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/operations/_web_apps_operations.py index 11029b48b5e7..b3df2b1a08ff 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/operations/_web_apps_operations.py @@ -338,8 +338,8 @@ def begin_create_or_update( :type site_envelope: ~azure.mgmt.web.v2016_08_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Site or the result of cls(response) @@ -1160,8 +1160,8 @@ def begin_restore( :type request: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either RestoreResponse or the result of cls(response) @@ -2195,8 +2195,8 @@ def begin_list_publishing_credentials( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either User or the result of cls(response) @@ -4188,8 +4188,8 @@ def begin_create_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2016_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -4589,8 +4589,8 @@ def begin_create_function( :type function_envelope: ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -6018,8 +6018,8 @@ def begin_create_instance_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2016_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -7129,8 +7129,8 @@ def begin_migrate_storage( :type migration_options: ~azure.mgmt.web.v2016_08_01.models.StorageMigrationOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either StorageMigrationResponse or the result of cls(response) @@ -7258,8 +7258,8 @@ def begin_migrate_my_sql( :type migration_request_envelope: ~azure.mgmt.web.v2016_08_01.models.MigrateMySqlRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Operation or the result of cls(response) @@ -9033,8 +9033,8 @@ def begin_recover( :type recovery_entity: ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -9428,8 +9428,8 @@ def begin_install_site_extension( :type site_extension_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -9800,8 +9800,8 @@ def begin_create_or_update_slot( :type ttl_in_seconds: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Site or the result of cls(response) @@ -10711,8 +10711,8 @@ def begin_restore_slot( :type request: ~azure.mgmt.web.v2016_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either RestoreResponse or the result of cls(response) @@ -11823,8 +11823,8 @@ def begin_list_publishing_credentials_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either User or the result of cls(response) @@ -13817,8 +13817,8 @@ def begin_create_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2016_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -14244,8 +14244,8 @@ def begin_create_instance_function_slot( :type function_envelope: ~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -15768,8 +15768,8 @@ def begin_create_instance_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2016_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -18707,8 +18707,8 @@ def begin_recover_slot( :type recovery_entity: ~azure.mgmt.web.v2016_08_01.models.SnapshotRecoveryRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -19130,8 +19130,8 @@ def begin_install_site_extension_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -19420,8 +19420,8 @@ def begin_swap_slot( :type slot_swap_entity: ~azure.mgmt.web.v2016_08_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -19714,8 +19714,8 @@ def begin_create_or_update_source_control_slot( :type site_source_control: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) @@ -21596,8 +21596,8 @@ def begin_swap_slot_with_production( :type slot_swap_entity: ~azure.mgmt.web.v2016_08_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -21873,8 +21873,8 @@ def begin_create_or_update_source_control( :type site_source_control: ~azure.mgmt.web.v2016_08_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/__init__.py index 32779ae9e1b0..45c59c58316a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['WebSiteManagementClient'] try: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_configuration.py index 870caf551976..7fd05d3967f8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_metadata.json index e7feac575af3..3848c869ac45 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,21 +44,61 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "app_service_environments": "AppServiceEnvironmentsOperations", "app_service_plans": "AppServicePlansOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_version.py new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_web_site_management_client.py index a777791a5848..34b5f46392a5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_web_site_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import WebSiteManagementClientConfiguration from .operations import AppServiceEnvironmentsOperations @@ -61,6 +62,24 @@ def __init__( self.app_service_plans = AppServicePlansOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_configuration.py index 8952108d56f0..7a0b7491a6a3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_web_site_management_client.py index d8aa4d3bb784..08cd03c2e60f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_web_site_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -58,6 +59,23 @@ def __init__( self.app_service_plans = AppServicePlansOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_environments_operations.py index a3bc93a905b3..66cce98f8811 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_environments_operations.py @@ -320,8 +320,8 @@ async def begin_create_or_update( :type hosting_environment_envelope: ~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) @@ -439,8 +439,8 @@ async def begin_delete( :type force_delete: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -1186,8 +1186,8 @@ async def begin_create_or_update_multi_role_pool( :type multi_role_pool_envelope: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -1995,8 +1995,8 @@ async def begin_resume( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2326,8 +2326,8 @@ async def begin_suspend( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2739,8 +2739,8 @@ async def begin_create_or_update_worker_pool( :type worker_pool_envelope: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_plans_operations.py index 9437bff21112..97626c42e446 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_plans_operations.py @@ -331,8 +331,8 @@ async def begin_create_or_update( :type app_service_plan: ~azure.mgmt.web.v2016_09_01.models.AppServicePlan :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServicePlan or the result of cls(response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/models/_models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/models/_models.py index 0a1d21756fcd..7cd51abebe9b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/models/_models.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/models/_models.py @@ -1154,8 +1154,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] """ @@ -3615,8 +3615,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/models/_models_py3.py index 3bf75f518d3c..40462a74cf09 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/models/_models_py3.py @@ -1283,8 +1283,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] """ @@ -4005,8 +4005,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_environments_operations.py index 2ed5fff8c14b..035a8f2fcb72 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_environments_operations.py @@ -329,8 +329,8 @@ def begin_create_or_update( :type hosting_environment_envelope: ~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) @@ -450,8 +450,8 @@ def begin_delete( :type force_delete: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -1208,8 +1208,8 @@ def begin_create_or_update_multi_role_pool( :type multi_role_pool_envelope: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -2028,8 +2028,8 @@ def begin_resume( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2363,8 +2363,8 @@ def begin_suspend( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2781,8 +2781,8 @@ def begin_create_or_update_worker_pool( :type worker_pool_envelope: ~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_plans_operations.py index 750569a64621..1600eb968e73 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_plans_operations.py @@ -340,8 +340,8 @@ def begin_create_or_update( :type app_service_plan: ~azure.mgmt.web.v2016_09_01.models.AppServicePlan :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServicePlan or the result of cls(response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/__init__.py index 32779ae9e1b0..45c59c58316a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['WebSiteManagementClient'] try: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_configuration.py index c39f12853558..20b106b6e2da 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_metadata.json index bdeb6b46d136..660f3e72a0ef 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "app_service_certificate_orders": "AppServiceCertificateOrdersOperations", @@ -68,211 +114,213 @@ "resource_health_metadata": "ResourceHealthMetadataOperations" }, "operation_mixins": { - "get_publishing_user" : { - "sync": { - "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "update_publishing_user" : { - "sync": { - "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2018_02_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2018_02_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "user_details" - }, - "list_source_controls" : { - "sync": { - "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "get_source_control" : { - "sync": { - "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "source_control_type" - }, - "update_source_control" : { - "sync": { - "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "source_control_type, request_message" - }, - "list_billing_meters" : { - "sync": { - "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "billing_location, os_type" - }, - "check_name_availability" : { - "sync": { - "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2018_02_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2018_02_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "name, type, is_fqdn" - }, - "get_subscription_deployment_locations" : { - "sync": { - "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "list_geo_regions" : { - "sync": { - "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" - }, - "list_site_identifiers_assigned_to_host_name" : { - "sync": { - "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2018_02_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2018_02_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "name_identifier" - }, - "list_premier_add_on_offers" : { - "sync": { - "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "list_skus" : { - "sync": { - "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "verify_hosting_environment_vnet" : { - "sync": { - "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2018_02_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2018_02_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "parameters" - }, - "move" : { - "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, move_resource_envelope" - }, - "validate" : { - "sync": { - "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2018_02_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2018_02_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, validate_request" - }, - "validate_container_settings" : { - "sync": { - "signature": "def validate_container_settings(\n self,\n resource_group_name, # type: str\n validate_container_settings_request, # type: \"_models.ValidateContainerSettingsRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate if the container settings are correct.\n\nValidate if the container settings are correct.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_container_settings_request:\n:type validate_container_settings_request: ~azure.mgmt.web.v2018_02_01.models.ValidateContainerSettingsRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: object, or the result of cls(response)\n:rtype: object\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate_container_settings(\n self,\n resource_group_name: str,\n validate_container_settings_request: \"_models.ValidateContainerSettingsRequest\",\n **kwargs\n) -\u003e object:\n", - "doc": "\"\"\"Validate if the container settings are correct.\n\nValidate if the container settings are correct.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_container_settings_request:\n:type validate_container_settings_request: ~azure.mgmt.web.v2018_02_01.models.ValidateContainerSettingsRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: object, or the result of cls(response)\n:rtype: object\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, validate_container_settings_request" - }, - "validate_move" : { - "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, move_resource_envelope" + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "operations": { + "get_publishing_user" : { + "sync": { + "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "update_publishing_user" : { + "sync": { + "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2018_02_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2018_02_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "user_details" + }, + "list_source_controls" : { + "sync": { + "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "get_source_control" : { + "sync": { + "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type" + }, + "update_source_control" : { + "sync": { + "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type, request_message" + }, + "list_billing_meters" : { + "sync": { + "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.BillingMeterCollection\"]:\n", + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "billing_location, os_type" + }, + "check_name_availability" : { + "sync": { + "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2018_02_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2018_02_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name, type, is_fqdn" + }, + "get_subscription_deployment_locations" : { + "sync": { + "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_geo_regions" : { + "sync": { + "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" + }, + "list_site_identifiers_assigned_to_host_name" : { + "sync": { + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2018_02_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2018_02_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name_identifier" + }, + "list_premier_add_on_offers" : { + "sync": { + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_skus" : { + "sync": { + "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "verify_hosting_environment_vnet" : { + "sync": { + "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2018_02_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2018_02_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "parameters" + }, + "move" : { + "sync": { + "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + }, + "validate" : { + "sync": { + "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2018_02_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2018_02_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, validate_request" + }, + "validate_container_settings" : { + "sync": { + "signature": "def validate_container_settings(\n self,\n resource_group_name, # type: str\n validate_container_settings_request, # type: \"_models.ValidateContainerSettingsRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate if the container settings are correct.\n\nValidate if the container settings are correct.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_container_settings_request:\n:type validate_container_settings_request: ~azure.mgmt.web.v2018_02_01.models.ValidateContainerSettingsRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: object, or the result of cls(response)\n:rtype: object\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate_container_settings(\n self,\n resource_group_name: str,\n validate_container_settings_request: \"_models.ValidateContainerSettingsRequest\",\n **kwargs\n) -\u003e object:\n", + "doc": "\"\"\"Validate if the container settings are correct.\n\nValidate if the container settings are correct.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_container_settings_request:\n:type validate_container_settings_request: ~azure.mgmt.web.v2018_02_01.models.ValidateContainerSettingsRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: object, or the result of cls(response)\n:rtype: object\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, validate_container_settings_request" + }, + "validate_move" : { + "sync": { + "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + } } - }, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}" + } } \ No newline at end of file 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 new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_web_site_management_client.py index 0fae3013eec7..991ab32f1f88 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_web_site_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import WebSiteManagementClientConfiguration from .operations import AppServiceCertificateOrdersOperations @@ -122,6 +123,24 @@ def __init__( self.resource_health_metadata = ResourceHealthMetadataOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_configuration.py index 80c3cb9d30c4..af56b6258589 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_web_site_management_client.py index 767f88832c8b..cd902379e954 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_web_site_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -119,6 +120,23 @@ def __init__( self.resource_health_metadata = ResourceHealthMetadataOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_certificate_orders_operations.py index dc1a74bfff09..a84ff89ea27e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_certificate_orders_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -229,7 +229,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -290,7 +290,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) @@ -344,7 +344,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -378,8 +378,8 @@ async def begin_create_or_update( :type certificate_distinguished_name: ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceCertificateOrder or the result of cls(response) @@ -545,7 +545,7 @@ async def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -626,7 +626,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -691,7 +691,7 @@ async def get_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) @@ -747,7 +747,7 @@ async def _create_or_update_certificate_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -784,8 +784,8 @@ async def begin_create_or_update_certificate( :type key_vault_certificate: ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceCertificateResource or the result of cls(response) @@ -961,7 +961,7 @@ async def update_certificate( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1278,7 +1278,7 @@ async def retrieve_site_seal( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteSeal', pipeline_response) @@ -1394,7 +1394,7 @@ async def retrieve_certificate_actions( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateOrderAction]', pipeline_response) @@ -1455,7 +1455,7 @@ async def retrieve_certificate_email_history( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateEmail]', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_environments_operations.py index cbdc431649f0..f60553f84e40 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_environments_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -174,7 +174,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -235,7 +235,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) @@ -323,8 +323,8 @@ async def begin_create_or_update( :type hosting_environment_envelope: ~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) @@ -442,8 +442,8 @@ async def begin_delete( :type force_delete: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -632,7 +632,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -693,7 +693,7 @@ async def list_vips( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressResponse', pipeline_response) @@ -747,7 +747,7 @@ async def _change_vnet_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -781,8 +781,8 @@ async def begin_change_vnet( :type vnet_info: ~azure.mgmt.web.v2018_02_01.models.VirtualNetworkProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -844,7 +844,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -948,7 +948,7 @@ async def list_diagnostics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', pipeline_response) @@ -1013,7 +1013,7 @@ async def get_diagnostics_item( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostingEnvironmentDiagnostics', pipeline_response) @@ -1090,7 +1090,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1151,7 +1151,7 @@ async def list_metric_definitions( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricDefinition', pipeline_response) @@ -1242,7 +1242,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1319,7 +1319,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1380,7 +1380,7 @@ async def get_multi_role_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -1468,8 +1468,8 @@ async def begin_create_or_update_multi_role_pool( :type multi_role_pool_envelope: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -1666,7 +1666,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1753,7 +1753,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1830,7 +1830,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1936,7 +1936,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2013,7 +2013,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2090,7 +2090,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2151,7 +2151,7 @@ async def list_operations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Operation]', pipeline_response) @@ -2228,7 +2228,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2331,7 +2331,7 @@ async def _resume_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2362,8 +2362,8 @@ async def begin_resume( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2417,7 +2417,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2536,7 +2536,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2618,7 +2618,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2666,7 +2666,7 @@ async def _suspend_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2697,8 +2697,8 @@ async def begin_suspend( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2752,7 +2752,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2879,7 +2879,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2956,7 +2956,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3021,7 +3021,7 @@ async def get_worker_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -3114,8 +3114,8 @@ async def begin_create_or_update_worker_pool( :type worker_pool_envelope: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -3321,7 +3321,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3420,7 +3420,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3501,7 +3501,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3596,7 +3596,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3677,7 +3677,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3758,7 +3758,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_plans_operations.py index 0bea712da508..564e5ada8182 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_plans_operations.py @@ -108,7 +108,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -181,7 +181,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -297,7 +297,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -334,8 +334,8 @@ async def begin_create_or_update( :type app_service_plan: ~azure.mgmt.web.v2018_02_01.models.AppServicePlan :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServicePlan or the result of cls(response) @@ -501,7 +501,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -566,7 +566,7 @@ async def list_capabilities( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Capability]', pipeline_response) @@ -635,7 +635,7 @@ async def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -767,7 +767,7 @@ async def list_hybrid_connection_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -852,7 +852,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -913,7 +913,7 @@ async def get_hybrid_connection_plan_limit( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionLimits', pipeline_response) @@ -990,7 +990,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1067,7 +1067,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1158,7 +1158,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1315,7 +1315,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1376,7 +1376,7 @@ async def get_server_farm_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -1459,7 +1459,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1520,7 +1520,7 @@ async def list_vnets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -1655,7 +1655,7 @@ async def get_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1732,7 +1732,7 @@ async def update_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1797,7 +1797,7 @@ async def list_routes_for_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetRoute]', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificate_registration_provider_operations.py index e759b1036577..9dc6fe46d0cd 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificate_registration_provider_operations.py @@ -96,7 +96,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificates_operations.py index e01fb8799a3d..5496fc8a4501 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificates_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -233,7 +233,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -302,7 +302,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -426,7 +426,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_deleted_web_apps_operations.py index 99cbc641095c..2934e5f95844 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_deleted_web_apps_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -233,7 +233,7 @@ async def get_deleted_web_app_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeletedSite', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_diagnostics_operations.py index 7384c181e504..ecfe56e1bd5a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_diagnostics_operations.py @@ -108,7 +108,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -188,7 +188,7 @@ async def get_hosting_environment_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -265,7 +265,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -345,7 +345,7 @@ async def get_site_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -422,7 +422,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -487,7 +487,7 @@ async def get_site_diagnostic_category( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -568,7 +568,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -637,7 +637,7 @@ async def get_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -721,7 +721,7 @@ async def execute_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -802,7 +802,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -887,7 +887,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -971,7 +971,7 @@ async def execute_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) @@ -1052,7 +1052,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1136,7 +1136,7 @@ async def get_site_detector_response_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -1217,7 +1217,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1286,7 +1286,7 @@ async def get_site_diagnostic_category_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -1371,7 +1371,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1444,7 +1444,7 @@ async def get_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -1532,7 +1532,7 @@ async def execute_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -1617,7 +1617,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1706,7 +1706,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1794,7 +1794,7 @@ async def execute_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domain_registration_provider_operations.py index e9fc8eeee498..85fc8da03663 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domain_registration_provider_operations.py @@ -96,7 +96,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domains_operations.py index 3c3b0b327b56..914c2f635a38 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domains_operations.py @@ -93,7 +93,7 @@ async def check_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainAvailablilityCheckResult', pipeline_response) @@ -162,7 +162,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -215,7 +215,7 @@ async def get_control_center_sso_request( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainControlCenterSsoRequest', pipeline_response) @@ -295,7 +295,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -368,7 +368,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -429,7 +429,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Domain', pipeline_response) @@ -483,7 +483,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -517,8 +517,8 @@ async def begin_create_or_update( :type domain: ~azure.mgmt.web.v2018_02_01.models.Domain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Domain or the result of cls(response) @@ -690,7 +690,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -771,7 +771,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -836,7 +836,7 @@ async def get_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -855,10 +855,10 @@ async def create_or_update_ownership_identifier( domain_ownership_identifier: "_models.DomainOwnershipIdentifier", **kwargs ) -> "_models.DomainOwnershipIdentifier": - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Creates an ownership identifier for a domain or updates identifier details for an existing - identifer. + identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -910,7 +910,7 @@ async def create_or_update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -988,10 +988,10 @@ async def update_ownership_identifier( domain_ownership_identifier: "_models.DomainOwnershipIdentifier", **kwargs ) -> "_models.DomainOwnershipIdentifier": - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Creates an ownership identifier for a domain or updates identifier details for an existing - identifer. + identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1043,7 +1043,7 @@ async def update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_provider_operations.py index ebf5ec5310fe..8817102c56f9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_provider_operations.py @@ -100,7 +100,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -166,7 +166,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_recommendations_operations.py index 827b4e9a9c42..db7b73111ae2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_recommendations_operations.py @@ -112,7 +112,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -300,7 +300,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -389,7 +389,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -584,7 +584,7 @@ async def get_rule_details_by_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -737,7 +737,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -826,7 +826,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1013,7 +1013,7 @@ async def get_rule_details_by_web_app( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_resource_health_metadata_operations.py index afd53c82f287..f7125b33965f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_resource_health_metadata_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -249,7 +249,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -310,7 +310,7 @@ async def get_by_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) @@ -391,7 +391,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -456,7 +456,7 @@ async def get_by_site_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_top_level_domains_operations.py index 0ab935d5186e..13a52bef62b5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_top_level_domains_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -156,7 +156,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TopLevelDomain', pipeline_response) @@ -240,7 +240,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_apps_operations.py index 587fec1398b5..a3e652b9311b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_apps_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -180,7 +180,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -296,7 +296,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -332,8 +332,8 @@ async def begin_create_or_update( :type site_envelope: ~azure.mgmt.web.v2018_02_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) @@ -512,7 +512,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -582,7 +582,7 @@ async def analyze_custom_hostname( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -715,7 +715,7 @@ async def backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -792,7 +792,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -857,7 +857,7 @@ async def get_backup_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -991,7 +991,7 @@ async def list_backup_status_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -1074,8 +1074,8 @@ async def begin_restore( :type request: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -1193,7 +1193,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1262,7 +1262,7 @@ async def update_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1323,7 +1323,7 @@ async def list_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1392,7 +1392,7 @@ async def update_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1453,7 +1453,7 @@ async def get_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1522,7 +1522,7 @@ async def update_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -1583,7 +1583,7 @@ async def list_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -1652,7 +1652,7 @@ async def update_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -1768,7 +1768,7 @@ async def get_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -1837,7 +1837,7 @@ async def update_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -1898,7 +1898,7 @@ async def list_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -1959,7 +1959,7 @@ async def get_diagnostic_logs_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2029,7 +2029,7 @@ async def update_diagnostic_logs_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2098,7 +2098,7 @@ async def update_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2159,7 +2159,7 @@ async def list_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2207,7 +2207,7 @@ async def _list_publishing_credentials_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -2234,8 +2234,8 @@ async def begin_list_publishing_credentials( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) @@ -2345,7 +2345,7 @@ async def update_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2406,7 +2406,7 @@ async def list_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2467,7 +2467,7 @@ async def list_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -2537,7 +2537,7 @@ async def update_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -2599,7 +2599,7 @@ async def get_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -2668,7 +2668,7 @@ async def create_or_update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -2737,7 +2737,7 @@ async def update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -2815,7 +2815,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2880,7 +2880,7 @@ async def get_configuration_snapshot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3140,7 +3140,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3460,7 +3460,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3525,7 +3525,7 @@ async def get_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -3598,7 +3598,7 @@ async def create_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -3723,7 +3723,7 @@ async def list_deployment_log( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -3794,7 +3794,7 @@ async def discover_backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -3871,7 +3871,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3936,7 +3936,7 @@ async def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4009,7 +4009,7 @@ async def create_or_update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4141,7 +4141,7 @@ async def update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4202,7 +4202,7 @@ async def get_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -4287,8 +4287,8 @@ async def begin_create_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2018_02_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -4529,7 +4529,7 @@ async def get_functions_admin_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -4651,7 +4651,7 @@ async def _create_function_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -4684,8 +4684,8 @@ async def begin_create_function( :type function_envelope: ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -4865,7 +4865,7 @@ async def create_or_update_function_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -4997,7 +4997,7 @@ async def list_function_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -5062,7 +5062,7 @@ async def list_function_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -5123,7 +5123,7 @@ async def list_host_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -5184,7 +5184,7 @@ async def list_sync_status( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5313,7 +5313,7 @@ async def create_or_update_host_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5386,7 +5386,7 @@ async def delete_host_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5460,7 +5460,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5525,7 +5525,7 @@ async def get_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -5599,7 +5599,7 @@ async def create_or_update_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -5727,7 +5727,7 @@ async def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -5804,7 +5804,7 @@ async def create_or_update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -5944,7 +5944,7 @@ async def update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6013,7 +6013,7 @@ async def list_hybrid_connection_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -6074,7 +6074,7 @@ async def list_hybrid_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6135,7 +6135,7 @@ async def list_relay_service_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6200,7 +6200,7 @@ async def get_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6273,7 +6273,7 @@ async def create_or_update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6405,7 +6405,7 @@ async def update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6482,7 +6482,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6547,7 +6547,7 @@ async def get_instance_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -6637,8 +6637,8 @@ async def begin_create_instance_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2018_02_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -7420,7 +7420,7 @@ async def is_cloneable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -7481,7 +7481,7 @@ async def list_sync_function_triggers( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -7558,7 +7558,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7649,7 +7649,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7705,7 +7705,7 @@ async def _migrate_storage_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) @@ -7738,8 +7738,8 @@ async def begin_migrate_storage( :type migration_options: ~azure.mgmt.web.v2018_02_01.models.StorageMigrationOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either StorageMigrationResponse or the result of cls(response) @@ -7836,7 +7836,7 @@ async def _migrate_my_sql_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Operation', pipeline_response) @@ -7866,8 +7866,8 @@ async def begin_migrate_my_sql( :type migration_request_envelope: ~azure.mgmt.web.v2018_02_01.models.MigrateMySqlRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Operation or the result of cls(response) @@ -7971,7 +7971,7 @@ async def get_migrate_my_sql_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -8032,7 +8032,7 @@ async def get_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8105,7 +8105,7 @@ async def create_or_update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8233,7 +8233,7 @@ async def update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8364,7 +8364,7 @@ async def get_network_trace_operation( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8444,7 +8444,7 @@ async def start_web_site_network_trace( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -8501,7 +8501,7 @@ async def _start_web_site_network_trace_operation_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8541,8 +8541,8 @@ async def begin_start_web_site_network_trace_operation( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -8706,7 +8706,7 @@ async def get_network_traces( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -8771,7 +8771,7 @@ async def get_network_trace_operation_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8840,7 +8840,7 @@ async def get_network_traces_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -8979,7 +8979,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9040,7 +9040,7 @@ async def get_site_php_error_log_flag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -9101,7 +9101,7 @@ async def list_premier_add_ons( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9166,7 +9166,7 @@ async def get_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9239,7 +9239,7 @@ async def add_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9371,7 +9371,7 @@ async def update_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9433,7 +9433,7 @@ async def get_private_access( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -9503,7 +9503,7 @@ async def put_private_access_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -10151,7 +10151,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10216,7 +10216,7 @@ async def get_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10290,7 +10290,7 @@ async def create_or_update_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10419,7 +10419,7 @@ async def list_publishing_profile_xml_with_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -10620,8 +10620,8 @@ async def begin_restore_from_backup_blob( :type request: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -10738,8 +10738,8 @@ async def begin_restore_from_deleted_app( :type restore_request: ~azure.mgmt.web.v2018_02_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -10857,8 +10857,8 @@ async def begin_restore_snapshot( :type restore_request: ~azure.mgmt.web.v2018_02_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11123,8 +11123,8 @@ async def begin_install_site_extension( :type site_extension_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -11303,7 +11303,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11425,7 +11425,7 @@ async def _create_or_update_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -11465,8 +11465,8 @@ async def begin_create_or_update_slot( :type site_envelope: ~azure.mgmt.web.v2018_02_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) @@ -11658,7 +11658,7 @@ async def update_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -11732,7 +11732,7 @@ async def analyze_custom_hostname_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -11875,7 +11875,7 @@ async def backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -11957,7 +11957,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12027,7 +12027,7 @@ async def get_backup_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12170,7 +12170,7 @@ async def list_backup_status_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12259,8 +12259,8 @@ async def begin_restore_slot( :type request: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -12385,7 +12385,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12459,7 +12459,7 @@ async def update_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -12525,7 +12525,7 @@ async def list_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -12598,7 +12598,7 @@ async def update_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -12664,7 +12664,7 @@ async def get_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -12738,7 +12738,7 @@ async def update_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -12804,7 +12804,7 @@ async def list_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -12878,7 +12878,7 @@ async def update_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13004,7 +13004,7 @@ async def get_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13078,7 +13078,7 @@ async def update_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13144,7 +13144,7 @@ async def list_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13210,7 +13210,7 @@ async def get_diagnostic_logs_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13285,7 +13285,7 @@ async def update_diagnostic_logs_config_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13359,7 +13359,7 @@ async def update_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13425,7 +13425,7 @@ async def list_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13475,7 +13475,7 @@ async def _list_publishing_credentials_slot_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -13506,8 +13506,8 @@ async def begin_list_publishing_credentials_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) @@ -13623,7 +13623,7 @@ async def update_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -13688,7 +13688,7 @@ async def list_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -13755,7 +13755,7 @@ async def get_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -13829,7 +13829,7 @@ async def create_or_update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -13903,7 +13903,7 @@ async def update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -13986,7 +13986,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14056,7 +14056,7 @@ async def get_configuration_snapshot_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14334,7 +14334,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14679,7 +14679,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14749,7 +14749,7 @@ async def get_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -14827,7 +14827,7 @@ async def create_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -14962,7 +14962,7 @@ async def list_deployment_log_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15038,7 +15038,7 @@ async def discover_backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -15120,7 +15120,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15190,7 +15190,7 @@ async def get_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15268,7 +15268,7 @@ async def create_or_update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15410,7 +15410,7 @@ async def update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15475,7 +15475,7 @@ async def get_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -15565,8 +15565,8 @@ async def begin_create_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2018_02_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -15821,7 +15821,7 @@ async def get_functions_admin_token_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -15949,7 +15949,7 @@ async def _create_instance_function_slot_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -15985,8 +15985,8 @@ async def begin_create_instance_function_slot( :type function_envelope: ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -16176,7 +16176,7 @@ async def create_or_update_function_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -16316,7 +16316,7 @@ async def list_function_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -16385,7 +16385,7 @@ async def list_function_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -16450,7 +16450,7 @@ async def list_host_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -16515,7 +16515,7 @@ async def list_sync_status_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16577,7 +16577,7 @@ async def sync_functions_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16655,7 +16655,7 @@ async def create_or_update_host_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -16732,7 +16732,7 @@ async def delete_host_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16811,7 +16811,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16881,7 +16881,7 @@ async def get_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -16960,7 +16960,7 @@ async def create_or_update_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17097,7 +17097,7 @@ async def get_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17178,7 +17178,7 @@ async def create_or_update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17326,7 +17326,7 @@ async def update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17399,7 +17399,7 @@ async def list_hybrid_connection_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -17464,7 +17464,7 @@ async def list_hybrid_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17530,7 +17530,7 @@ async def list_relay_service_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -17600,7 +17600,7 @@ async def get_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -17678,7 +17678,7 @@ async def create_or_update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -17820,7 +17820,7 @@ async def update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -17902,7 +17902,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17971,7 +17971,7 @@ async def get_instance_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -18066,8 +18066,8 @@ async def begin_create_instance_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2018_02_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -18900,7 +18900,7 @@ async def is_cloneable_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -18965,7 +18965,7 @@ async def list_sync_function_triggers_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -19047,7 +19047,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19143,7 +19143,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19209,7 +19209,7 @@ async def get_migrate_my_sql_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -19275,7 +19275,7 @@ async def get_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19353,7 +19353,7 @@ async def create_or_update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19491,7 +19491,7 @@ async def update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19632,7 +19632,7 @@ async def get_network_trace_operation_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -19716,7 +19716,7 @@ async def start_web_site_network_trace_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -19775,7 +19775,7 @@ async def _start_web_site_network_trace_operation_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -19818,8 +19818,8 @@ async def begin_start_web_site_network_trace_operation_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -19994,7 +19994,7 @@ async def get_network_traces_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20064,7 +20064,7 @@ async def get_network_trace_operation_slot_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20138,7 +20138,7 @@ async def get_network_traces_slot_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20286,7 +20286,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -20351,7 +20351,7 @@ async def get_site_php_error_log_flag_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -20417,7 +20417,7 @@ async def list_premier_add_ons_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -20487,7 +20487,7 @@ async def get_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -20565,7 +20565,7 @@ async def add_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -20707,7 +20707,7 @@ async def update_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -20773,7 +20773,7 @@ async def get_private_access_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -20847,7 +20847,7 @@ async def put_private_access_vnet_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21540,7 +21540,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21610,7 +21610,7 @@ async def get_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -21689,7 +21689,7 @@ async def create_or_update_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -21828,7 +21828,7 @@ async def list_publishing_profile_xml_with_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -22045,8 +22045,8 @@ async def begin_restore_from_backup_blob_slot( :type request: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -22170,8 +22170,8 @@ async def begin_restore_from_deleted_app_slot( :type restore_request: ~azure.mgmt.web.v2018_02_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -22296,8 +22296,8 @@ async def begin_restore_snapshot_slot( :type restore_request: ~azure.mgmt.web.v2018_02_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -22580,8 +22580,8 @@ async def begin_install_site_extension_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -22783,7 +22783,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22867,8 +22867,8 @@ async def begin_swap_slot( :type slot_swap_entity: ~azure.mgmt.web.v2018_02_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -22990,7 +22990,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23071,7 +23071,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23137,7 +23137,7 @@ async def get_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -23200,7 +23200,7 @@ async def _create_or_update_source_control_slot_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -23241,8 +23241,8 @@ async def begin_create_or_update_source_control_slot( :type site_source_control: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) @@ -23420,7 +23420,7 @@ async def update_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -23546,7 +23546,7 @@ async def _start_network_trace_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -23589,8 +23589,8 @@ async def begin_start_network_trace_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -23955,7 +23955,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24404,7 +24404,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24470,7 +24470,7 @@ async def list_vnet_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -24540,7 +24540,7 @@ async def get_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -24619,7 +24619,7 @@ async def create_or_update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -24762,7 +24762,7 @@ async def update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -24919,7 +24919,7 @@ async def create_or_update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -25001,7 +25001,7 @@ async def update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -25083,7 +25083,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25153,7 +25153,7 @@ async def get_web_job_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) @@ -25241,7 +25241,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25319,8 +25319,8 @@ async def begin_swap_slot_with_production( :type slot_swap_entity: ~azure.mgmt.web.v2018_02_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -25436,7 +25436,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25513,7 +25513,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25574,7 +25574,7 @@ async def get_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -25635,7 +25635,7 @@ async def _create_or_update_source_control_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -25672,8 +25672,8 @@ async def begin_create_or_update_source_control( :type site_source_control: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) @@ -25839,7 +25839,7 @@ async def update_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -25958,7 +25958,7 @@ async def _start_network_trace_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -25998,8 +25998,8 @@ async def begin_start_network_trace( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -26340,7 +26340,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26759,7 +26759,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26820,7 +26820,7 @@ async def list_vnet_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -26885,7 +26885,7 @@ async def get_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -26959,7 +26959,7 @@ async def create_or_update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -27092,7 +27092,7 @@ async def update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -27239,7 +27239,7 @@ async def create_or_update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -27316,7 +27316,7 @@ async def update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -27393,7 +27393,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27458,7 +27458,7 @@ async def get_web_job( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_site_management_client_operations.py index 1ee51a0cbc32..e91c5400882a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_site_management_client_operations.py @@ -59,7 +59,7 @@ async def get_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -116,7 +116,7 @@ async def update_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -181,7 +181,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -237,7 +237,7 @@ async def get_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -301,7 +301,7 @@ async def update_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -380,7 +380,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -449,7 +449,7 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceNameAvailability', pipeline_response) @@ -502,7 +502,7 @@ async def get_subscription_deployment_locations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeploymentLocations', pipeline_response) @@ -594,7 +594,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -674,7 +674,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -743,7 +743,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -796,7 +796,7 @@ async def list_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SkuInfos', pipeline_response) @@ -858,7 +858,7 @@ async def verify_hosting_environment_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetValidationFailureDetails', pipeline_response) @@ -982,7 +982,7 @@ async def validate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateResponse', pipeline_response) @@ -1047,7 +1047,7 @@ async def validate_container_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/models/_models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/models/_models.py index b175543ead67..5b7f694bc927 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/models/_models.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/models/_models.py @@ -3419,8 +3419,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] :param support_credentials: Gets or sets whether CORS requests with credentials are allowed. @@ -5155,8 +5155,8 @@ class DomainControlCenterSsoRequest(msrest.serialization.Model): :vartype url: str :ivar post_parameter_key: Post parameter key. :vartype post_parameter_key: str - :ivar post_parameter_value: Post parameter value. Client should use 'application/x-www-form- - urlencoded' encoding for this value. + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. :vartype post_parameter_value: str """ @@ -10071,8 +10071,8 @@ class SiteAuthSettings(ProxyOnlyResource): When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. - More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect- - discovery-1_0.html. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. :type issuer: str :param validate_issuer: Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. @@ -10136,8 +10136,8 @@ class SiteAuthSettings(ProxyOnlyResource): :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. - Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en- - us/library/dn631845.aspx. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. :type microsoft_account_o_auth_scopes: list[str] """ @@ -13567,8 +13567,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str :param is_swift: Flag that is used to denote if this is VNET injection. :type is_swift: bool diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/models/_models_py3.py index 34e3629f0ce1..6240a8d786ef 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/models/_models_py3.py @@ -3752,8 +3752,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] :param support_credentials: Gets or sets whether CORS requests with credentials are allowed. @@ -5659,8 +5659,8 @@ class DomainControlCenterSsoRequest(msrest.serialization.Model): :vartype url: str :ivar post_parameter_key: Post parameter key. :vartype post_parameter_key: str - :ivar post_parameter_value: Post parameter value. Client should use 'application/x-www-form- - urlencoded' encoding for this value. + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. :vartype post_parameter_value: str """ @@ -11115,8 +11115,8 @@ class SiteAuthSettings(ProxyOnlyResource): When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. - More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect- - discovery-1_0.html. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. :type issuer: str :param validate_issuer: Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. @@ -11180,8 +11180,8 @@ class SiteAuthSettings(ProxyOnlyResource): :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. - Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en- - us/library/dn631845.aspx. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. :type microsoft_account_o_auth_scopes: list[str] """ @@ -15055,8 +15055,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str :param is_swift: Flag that is used to denote if this is VNET injection. :type is_swift: bool diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_certificate_orders_operations.py index 72648ec02b1d..941ce9ae8717 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_certificate_orders_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -236,7 +236,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -298,7 +298,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) @@ -353,7 +353,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -388,8 +388,8 @@ def begin_create_or_update( :type certificate_distinguished_name: ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceCertificateOrder or the result of cls(response) @@ -557,7 +557,7 @@ def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -639,7 +639,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -705,7 +705,7 @@ def get_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) @@ -762,7 +762,7 @@ def _create_or_update_certificate_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -800,8 +800,8 @@ def begin_create_or_update_certificate( :type key_vault_certificate: ~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceCertificateResource or the result of cls(response) @@ -979,7 +979,7 @@ def update_certificate( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1301,7 +1301,7 @@ def retrieve_site_seal( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteSeal', pipeline_response) @@ -1419,7 +1419,7 @@ def retrieve_certificate_actions( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateOrderAction]', pipeline_response) @@ -1481,7 +1481,7 @@ def retrieve_certificate_email_history( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateEmail]', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_environments_operations.py index 8b28eb1aa851..0693dc9557e4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_environments_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -180,7 +180,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -242,7 +242,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) @@ -332,8 +332,8 @@ def begin_create_or_update( :type hosting_environment_envelope: ~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) @@ -453,8 +453,8 @@ def begin_delete( :type force_delete: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -645,7 +645,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -707,7 +707,7 @@ def list_vips( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressResponse', pipeline_response) @@ -762,7 +762,7 @@ def _change_vnet_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -797,8 +797,8 @@ def begin_change_vnet( :type vnet_info: ~azure.mgmt.web.v2018_02_01.models.VirtualNetworkProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -860,7 +860,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -965,7 +965,7 @@ def list_diagnostics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', pipeline_response) @@ -1031,7 +1031,7 @@ def get_diagnostics_item( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostingEnvironmentDiagnostics', pipeline_response) @@ -1109,7 +1109,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1171,7 +1171,7 @@ def list_metric_definitions( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricDefinition', pipeline_response) @@ -1263,7 +1263,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1341,7 +1341,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1403,7 +1403,7 @@ def get_multi_role_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -1493,8 +1493,8 @@ def begin_create_or_update_multi_role_pool( :type multi_role_pool_envelope: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -1693,7 +1693,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1781,7 +1781,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1859,7 +1859,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1966,7 +1966,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2044,7 +2044,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2122,7 +2122,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2184,7 +2184,7 @@ def list_operations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Operation]', pipeline_response) @@ -2262,7 +2262,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2367,7 +2367,7 @@ def _resume_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2399,8 +2399,8 @@ def begin_resume( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2454,7 +2454,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2574,7 +2574,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2657,7 +2657,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2706,7 +2706,7 @@ def _suspend_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2738,8 +2738,8 @@ def begin_suspend( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2793,7 +2793,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2921,7 +2921,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2999,7 +2999,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3065,7 +3065,7 @@ def get_worker_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -3160,8 +3160,8 @@ def begin_create_or_update_worker_pool( :type worker_pool_envelope: ~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -3369,7 +3369,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3469,7 +3469,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3551,7 +3551,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3647,7 +3647,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3729,7 +3729,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3811,7 +3811,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_plans_operations.py index 640029d726f3..dc8394e04ee2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_plans_operations.py @@ -113,7 +113,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -187,7 +187,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -305,7 +305,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -343,8 +343,8 @@ def begin_create_or_update( :type app_service_plan: ~azure.mgmt.web.v2018_02_01.models.AppServicePlan :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServicePlan or the result of cls(response) @@ -512,7 +512,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -578,7 +578,7 @@ def list_capabilities( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Capability]', pipeline_response) @@ -648,7 +648,7 @@ def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -782,7 +782,7 @@ def list_hybrid_connection_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -868,7 +868,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -930,7 +930,7 @@ def get_hybrid_connection_plan_limit( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionLimits', pipeline_response) @@ -1008,7 +1008,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1086,7 +1086,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1178,7 +1178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1337,7 +1337,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1399,7 +1399,7 @@ def get_server_farm_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -1483,7 +1483,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1545,7 +1545,7 @@ def list_vnets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -1682,7 +1682,7 @@ def get_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1760,7 +1760,7 @@ def update_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1826,7 +1826,7 @@ def list_routes_for_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetRoute]', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificate_registration_provider_operations.py index fd5160f951a3..1efabed3c5a3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificate_registration_provider_operations.py @@ -101,7 +101,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificates_operations.py index b13d837c799e..13018d866f2d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificates_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -310,7 +310,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -436,7 +436,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_deleted_web_apps_operations.py index 848032c929ad..6ebf69aae855 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_deleted_web_apps_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ def get_deleted_web_app_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeletedSite', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_diagnostics_operations.py index 1b653f4704e5..8fec53921f9e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_diagnostics_operations.py @@ -113,7 +113,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -194,7 +194,7 @@ def get_hosting_environment_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -272,7 +272,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -353,7 +353,7 @@ def get_site_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -431,7 +431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -497,7 +497,7 @@ def get_site_diagnostic_category( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -579,7 +579,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -649,7 +649,7 @@ def get_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -734,7 +734,7 @@ def execute_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -816,7 +816,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -902,7 +902,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -987,7 +987,7 @@ def execute_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) @@ -1069,7 +1069,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1154,7 +1154,7 @@ def get_site_detector_response_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -1236,7 +1236,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1306,7 +1306,7 @@ def get_site_diagnostic_category_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -1392,7 +1392,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1466,7 +1466,7 @@ def get_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -1555,7 +1555,7 @@ def execute_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -1641,7 +1641,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1731,7 +1731,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1820,7 +1820,7 @@ def execute_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domain_registration_provider_operations.py index 956cc317675a..2632495d9399 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domain_registration_provider_operations.py @@ -101,7 +101,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py index 3c60f09f8dcb..8e96f3896533 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py @@ -98,7 +98,7 @@ def check_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainAvailablilityCheckResult', pipeline_response) @@ -168,7 +168,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -222,7 +222,7 @@ def get_control_center_sso_request( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainControlCenterSsoRequest', pipeline_response) @@ -303,7 +303,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -377,7 +377,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -439,7 +439,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Domain', pipeline_response) @@ -494,7 +494,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -529,8 +529,8 @@ def begin_create_or_update( :type domain: ~azure.mgmt.web.v2018_02_01.models.Domain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Domain or the result of cls(response) @@ -704,7 +704,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -786,7 +786,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -852,7 +852,7 @@ def get_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -872,10 +872,10 @@ def create_or_update_ownership_identifier( **kwargs # type: Any ): # type: (...) -> "_models.DomainOwnershipIdentifier" - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Creates an ownership identifier for a domain or updates identifier details for an existing - identifer. + identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -927,7 +927,7 @@ def create_or_update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -1007,10 +1007,10 @@ def update_ownership_identifier( **kwargs # type: Any ): # type: (...) -> "_models.DomainOwnershipIdentifier" - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Creates an ownership identifier for a domain or updates identifier details for an existing - identifer. + identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1062,7 +1062,7 @@ def update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_provider_operations.py index f8df7094809a..f5091b8d88f6 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_provider_operations.py @@ -105,7 +105,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -247,7 +247,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_recommendations_operations.py index f89ba29c1d0f..c27201e05a4a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_recommendations_operations.py @@ -117,7 +117,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -308,7 +308,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -398,7 +398,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -596,7 +596,7 @@ def get_rule_details_by_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -751,7 +751,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -841,7 +841,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1031,7 +1031,7 @@ def get_rule_details_by_web_app( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_resource_health_metadata_operations.py index 90d430832f25..9522abfdfa00 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_resource_health_metadata_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -256,7 +256,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -318,7 +318,7 @@ def get_by_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) @@ -400,7 +400,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -466,7 +466,7 @@ def get_by_site_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_top_level_domains_operations.py index be38559296f5..e45e1f85bb15 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_top_level_domains_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -162,7 +162,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TopLevelDomain', pipeline_response) @@ -247,7 +247,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_apps_operations.py index e59f3dd23701..730b1d421814 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_apps_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -186,7 +186,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -304,7 +304,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -341,8 +341,8 @@ def begin_create_or_update( :type site_envelope: ~azure.mgmt.web.v2018_02_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Site or the result of cls(response) @@ -523,7 +523,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -594,7 +594,7 @@ def analyze_custom_hostname( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -729,7 +729,7 @@ def backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -807,7 +807,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -873,7 +873,7 @@ def get_backup_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -1009,7 +1009,7 @@ def list_backup_status_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -1094,8 +1094,8 @@ def begin_restore( :type request: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -1214,7 +1214,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1284,7 +1284,7 @@ def update_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1346,7 +1346,7 @@ def list_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1416,7 +1416,7 @@ def update_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1478,7 +1478,7 @@ def get_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1548,7 +1548,7 @@ def update_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -1610,7 +1610,7 @@ def list_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -1680,7 +1680,7 @@ def update_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -1798,7 +1798,7 @@ def get_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -1868,7 +1868,7 @@ def update_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -1930,7 +1930,7 @@ def list_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -1992,7 +1992,7 @@ def get_diagnostic_logs_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2063,7 +2063,7 @@ def update_diagnostic_logs_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2133,7 +2133,7 @@ def update_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2195,7 +2195,7 @@ def list_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2244,7 +2244,7 @@ def _list_publishing_credentials_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -2272,8 +2272,8 @@ def begin_list_publishing_credentials( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either User or the result of cls(response) @@ -2384,7 +2384,7 @@ def update_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2446,7 +2446,7 @@ def list_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2508,7 +2508,7 @@ def list_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -2579,7 +2579,7 @@ def update_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -2642,7 +2642,7 @@ def get_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -2712,7 +2712,7 @@ def create_or_update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -2782,7 +2782,7 @@ def update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -2861,7 +2861,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2927,7 +2927,7 @@ def get_configuration_snapshot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3191,7 +3191,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3516,7 +3516,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3582,7 +3582,7 @@ def get_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -3656,7 +3656,7 @@ def create_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -3783,7 +3783,7 @@ def list_deployment_log( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -3855,7 +3855,7 @@ def discover_backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -3933,7 +3933,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3999,7 +3999,7 @@ def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4073,7 +4073,7 @@ def create_or_update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4207,7 +4207,7 @@ def update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4269,7 +4269,7 @@ def get_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -4356,8 +4356,8 @@ def begin_create_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2018_02_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -4601,7 +4601,7 @@ def get_functions_admin_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -4725,7 +4725,7 @@ def _create_function_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -4759,8 +4759,8 @@ def begin_create_function( :type function_envelope: ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -4942,7 +4942,7 @@ def create_or_update_function_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5076,7 +5076,7 @@ def list_function_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -5142,7 +5142,7 @@ def list_function_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -5204,7 +5204,7 @@ def list_host_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -5266,7 +5266,7 @@ def list_sync_status( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5397,7 +5397,7 @@ def create_or_update_host_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5471,7 +5471,7 @@ def delete_host_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5546,7 +5546,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5612,7 +5612,7 @@ def get_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -5687,7 +5687,7 @@ def create_or_update_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -5817,7 +5817,7 @@ def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -5895,7 +5895,7 @@ def create_or_update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6037,7 +6037,7 @@ def update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6107,7 +6107,7 @@ def list_hybrid_connection_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -6169,7 +6169,7 @@ def list_hybrid_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6231,7 +6231,7 @@ def list_relay_service_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6297,7 +6297,7 @@ def get_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6371,7 +6371,7 @@ def create_or_update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6505,7 +6505,7 @@ def update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6583,7 +6583,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6649,7 +6649,7 @@ def get_instance_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -6741,8 +6741,8 @@ def begin_create_instance_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2018_02_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -7534,7 +7534,7 @@ def is_cloneable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -7596,7 +7596,7 @@ def list_sync_function_triggers( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -7674,7 +7674,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7766,7 +7766,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7823,7 +7823,7 @@ def _migrate_storage_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) @@ -7857,8 +7857,8 @@ def begin_migrate_storage( :type migration_options: ~azure.mgmt.web.v2018_02_01.models.StorageMigrationOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either StorageMigrationResponse or the result of cls(response) @@ -7956,7 +7956,7 @@ def _migrate_my_sql_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Operation', pipeline_response) @@ -7987,8 +7987,8 @@ def begin_migrate_my_sql( :type migration_request_envelope: ~azure.mgmt.web.v2018_02_01.models.MigrateMySqlRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Operation or the result of cls(response) @@ -8093,7 +8093,7 @@ def get_migrate_my_sql_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -8155,7 +8155,7 @@ def get_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8229,7 +8229,7 @@ def create_or_update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8359,7 +8359,7 @@ def update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8492,7 +8492,7 @@ def get_network_trace_operation( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8573,7 +8573,7 @@ def start_web_site_network_trace( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -8631,7 +8631,7 @@ def _start_web_site_network_trace_operation_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8672,8 +8672,8 @@ def begin_start_web_site_network_trace_operation( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -8839,7 +8839,7 @@ def get_network_traces( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -8905,7 +8905,7 @@ def get_network_trace_operation_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8975,7 +8975,7 @@ def get_network_traces_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9116,7 +9116,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9178,7 +9178,7 @@ def get_site_php_error_log_flag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -9240,7 +9240,7 @@ def list_premier_add_ons( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9306,7 +9306,7 @@ def get_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9380,7 +9380,7 @@ def add_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9514,7 +9514,7 @@ def update_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9577,7 +9577,7 @@ def get_private_access( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -9648,7 +9648,7 @@ def put_private_access_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -10305,7 +10305,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10371,7 +10371,7 @@ def get_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10446,7 +10446,7 @@ def create_or_update_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10577,7 +10577,7 @@ def list_publishing_profile_xml_with_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -10782,8 +10782,8 @@ def begin_restore_from_backup_blob( :type request: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -10902,8 +10902,8 @@ def begin_restore_from_deleted_app( :type restore_request: ~azure.mgmt.web.v2018_02_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11023,8 +11023,8 @@ def begin_restore_snapshot( :type restore_request: ~azure.mgmt.web.v2018_02_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11293,8 +11293,8 @@ def begin_install_site_extension( :type site_extension_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -11475,7 +11475,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11599,7 +11599,7 @@ def _create_or_update_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -11640,8 +11640,8 @@ def begin_create_or_update_slot( :type site_envelope: ~azure.mgmt.web.v2018_02_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Site or the result of cls(response) @@ -11835,7 +11835,7 @@ def update_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -11910,7 +11910,7 @@ def analyze_custom_hostname_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -12055,7 +12055,7 @@ def backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12138,7 +12138,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12209,7 +12209,7 @@ def get_backup_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12354,7 +12354,7 @@ def list_backup_status_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12445,8 +12445,8 @@ def begin_restore_slot( :type request: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -12572,7 +12572,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12647,7 +12647,7 @@ def update_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -12714,7 +12714,7 @@ def list_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -12788,7 +12788,7 @@ def update_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -12855,7 +12855,7 @@ def get_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -12930,7 +12930,7 @@ def update_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -12997,7 +12997,7 @@ def list_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13072,7 +13072,7 @@ def update_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13200,7 +13200,7 @@ def get_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13275,7 +13275,7 @@ def update_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13342,7 +13342,7 @@ def list_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13409,7 +13409,7 @@ def get_diagnostic_logs_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13485,7 +13485,7 @@ def update_diagnostic_logs_config_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13560,7 +13560,7 @@ def update_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13627,7 +13627,7 @@ def list_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13678,7 +13678,7 @@ def _list_publishing_credentials_slot_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -13710,8 +13710,8 @@ def begin_list_publishing_credentials_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either User or the result of cls(response) @@ -13828,7 +13828,7 @@ def update_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -13894,7 +13894,7 @@ def list_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -13962,7 +13962,7 @@ def get_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14037,7 +14037,7 @@ def create_or_update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14112,7 +14112,7 @@ def update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14196,7 +14196,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14267,7 +14267,7 @@ def get_configuration_snapshot_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14549,7 +14549,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14899,7 +14899,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14970,7 +14970,7 @@ def get_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15049,7 +15049,7 @@ def create_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15186,7 +15186,7 @@ def list_deployment_log_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15263,7 +15263,7 @@ def discover_backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -15346,7 +15346,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15417,7 +15417,7 @@ def get_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15496,7 +15496,7 @@ def create_or_update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15640,7 +15640,7 @@ def update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15706,7 +15706,7 @@ def get_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -15798,8 +15798,8 @@ def begin_create_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2018_02_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -16057,7 +16057,7 @@ def get_functions_admin_token_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -16187,7 +16187,7 @@ def _create_instance_function_slot_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -16224,8 +16224,8 @@ def begin_create_instance_function_slot( :type function_envelope: ~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -16417,7 +16417,7 @@ def create_or_update_function_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -16559,7 +16559,7 @@ def list_function_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -16629,7 +16629,7 @@ def list_function_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -16695,7 +16695,7 @@ def list_host_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -16761,7 +16761,7 @@ def list_sync_status_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16824,7 +16824,7 @@ def sync_functions_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16903,7 +16903,7 @@ def create_or_update_host_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -16981,7 +16981,7 @@ def delete_host_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17061,7 +17061,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17132,7 +17132,7 @@ def get_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17212,7 +17212,7 @@ def create_or_update_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17351,7 +17351,7 @@ def get_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17433,7 +17433,7 @@ def create_or_update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17583,7 +17583,7 @@ def update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17657,7 +17657,7 @@ def list_hybrid_connection_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -17723,7 +17723,7 @@ def list_hybrid_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17790,7 +17790,7 @@ def list_relay_service_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -17861,7 +17861,7 @@ def get_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -17940,7 +17940,7 @@ def create_or_update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18084,7 +18084,7 @@ def update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18167,7 +18167,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -18237,7 +18237,7 @@ def get_instance_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -18334,8 +18334,8 @@ def begin_create_instance_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2018_02_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -19178,7 +19178,7 @@ def is_cloneable_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -19244,7 +19244,7 @@ def list_sync_function_triggers_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -19327,7 +19327,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19424,7 +19424,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19491,7 +19491,7 @@ def get_migrate_my_sql_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -19558,7 +19558,7 @@ def get_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19637,7 +19637,7 @@ def create_or_update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19777,7 +19777,7 @@ def update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19920,7 +19920,7 @@ def get_network_trace_operation_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20005,7 +20005,7 @@ def start_web_site_network_trace_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -20065,7 +20065,7 @@ def _start_web_site_network_trace_operation_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20109,8 +20109,8 @@ def begin_start_web_site_network_trace_operation_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -20287,7 +20287,7 @@ def get_network_traces_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20358,7 +20358,7 @@ def get_network_trace_operation_slot_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20433,7 +20433,7 @@ def get_network_traces_slot_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20583,7 +20583,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -20649,7 +20649,7 @@ def get_site_php_error_log_flag_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -20716,7 +20716,7 @@ def list_premier_add_ons_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -20787,7 +20787,7 @@ def get_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -20866,7 +20866,7 @@ def add_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21010,7 +21010,7 @@ def update_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21077,7 +21077,7 @@ def get_private_access_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21152,7 +21152,7 @@ def put_private_access_vnet_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21854,7 +21854,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21925,7 +21925,7 @@ def get_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22005,7 +22005,7 @@ def create_or_update_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22146,7 +22146,7 @@ def list_publishing_profile_xml_with_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -22367,8 +22367,8 @@ def begin_restore_from_backup_blob_slot( :type request: ~azure.mgmt.web.v2018_02_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -22494,8 +22494,8 @@ def begin_restore_from_deleted_app_slot( :type restore_request: ~azure.mgmt.web.v2018_02_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -22622,8 +22622,8 @@ def begin_restore_snapshot_slot( :type restore_request: ~azure.mgmt.web.v2018_02_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -22910,8 +22910,8 @@ def begin_install_site_extension_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -23115,7 +23115,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23201,8 +23201,8 @@ def begin_swap_slot( :type slot_swap_entity: ~azure.mgmt.web.v2018_02_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23325,7 +23325,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23407,7 +23407,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23474,7 +23474,7 @@ def get_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -23538,7 +23538,7 @@ def _create_or_update_source_control_slot_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -23580,8 +23580,8 @@ def begin_create_or_update_source_control_slot( :type site_source_control: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) @@ -23761,7 +23761,7 @@ def update_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -23889,7 +23889,7 @@ def _start_network_trace_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -23933,8 +23933,8 @@ def begin_start_network_trace_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -24304,7 +24304,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24759,7 +24759,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24826,7 +24826,7 @@ def list_vnet_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -24897,7 +24897,7 @@ def get_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -24977,7 +24977,7 @@ def create_or_update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25122,7 +25122,7 @@ def update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25281,7 +25281,7 @@ def create_or_update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -25364,7 +25364,7 @@ def update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -25447,7 +25447,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25518,7 +25518,7 @@ def get_web_job_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) @@ -25607,7 +25607,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25687,8 +25687,8 @@ def begin_swap_slot_with_production( :type slot_swap_entity: ~azure.mgmt.web.v2018_02_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -25805,7 +25805,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25883,7 +25883,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25945,7 +25945,7 @@ def get_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26007,7 +26007,7 @@ def _create_or_update_source_control_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26045,8 +26045,8 @@ def begin_create_or_update_source_control( :type site_source_control: ~azure.mgmt.web.v2018_02_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) @@ -26214,7 +26214,7 @@ def update_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26335,7 +26335,7 @@ def _start_network_trace_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26376,8 +26376,8 @@ def begin_start_network_trace( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -26723,7 +26723,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27148,7 +27148,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27210,7 +27210,7 @@ def list_vnet_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -27276,7 +27276,7 @@ def get_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -27351,7 +27351,7 @@ def create_or_update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -27486,7 +27486,7 @@ def update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -27635,7 +27635,7 @@ def create_or_update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -27713,7 +27713,7 @@ def update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -27791,7 +27791,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27857,7 +27857,7 @@ def get_web_job( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_site_management_client_operations.py index ff7d68eea51e..3a0d118b5911 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_site_management_client_operations.py @@ -64,7 +64,7 @@ def get_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -122,7 +122,7 @@ def update_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -188,7 +188,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -245,7 +245,7 @@ def get_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -310,7 +310,7 @@ def update_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -390,7 +390,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -460,7 +460,7 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceNameAvailability', pipeline_response) @@ -514,7 +514,7 @@ def get_subscription_deployment_locations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeploymentLocations', pipeline_response) @@ -607,7 +607,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -688,7 +688,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -758,7 +758,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -812,7 +812,7 @@ def list_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SkuInfos', pipeline_response) @@ -875,7 +875,7 @@ def verify_hosting_environment_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetValidationFailureDetails', pipeline_response) @@ -1001,7 +1001,7 @@ def validate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateResponse', pipeline_response) @@ -1067,7 +1067,7 @@ def validate_container_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/__init__.py index 32779ae9e1b0..45c59c58316a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['WebSiteManagementClient'] try: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_configuration.py index f2fea06223e9..93ee893dbacc 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_metadata.json index 9fe6f1a0dc7e..fafc27c08066 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,20 +44,60 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "certificates": "CertificatesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_version.py new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_web_site_management_client.py index 0cf6bc936e60..d76615831522 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_web_site_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import WebSiteManagementClientConfiguration from .operations import CertificatesOperations @@ -55,6 +56,24 @@ def __init__( self.certificates = CertificatesOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_configuration.py index 912eceb9824b..34b940936229 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_web_site_management_client.py index 4885d924323f..017f0e17cfc1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_web_site_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -52,6 +53,23 @@ def __init__( self.certificates = CertificatesOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/operations/_certificates_operations.py index f21843bb5c63..1863bbd02d57 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/operations/_certificates_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -233,7 +233,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -302,7 +302,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -426,7 +426,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/operations/_certificates_operations.py index 8d2c92956909..b4fa7415ab3f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/operations/_certificates_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -310,7 +310,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -436,7 +436,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/__init__.py index 32779ae9e1b0..45c59c58316a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['WebSiteManagementClient'] try: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_configuration.py index 6352cef88fde..ac656a9a822f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_metadata.json index b402614f3439..f0ace0d58c26 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "app_service_certificate_orders": "AppServiceCertificateOrdersOperations", @@ -69,199 +115,201 @@ "resource_health_metadata": "ResourceHealthMetadataOperations" }, "operation_mixins": { - "get_publishing_user" : { - "sync": { - "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "update_publishing_user" : { - "sync": { - "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2019_08_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2019_08_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "user_details" - }, - "list_source_controls" : { - "sync": { - "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "get_source_control" : { - "sync": { - "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "source_control_type" - }, - "update_source_control" : { - "sync": { - "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "source_control_type, request_message" - }, - "list_billing_meters" : { - "sync": { - "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "billing_location, os_type" - }, - "check_name_availability" : { - "sync": { - "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "name, type, is_fqdn" - }, - "get_subscription_deployment_locations" : { - "sync": { - "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "list_geo_regions" : { - "sync": { - "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" - }, - "list_site_identifiers_assigned_to_host_name" : { - "sync": { - "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "name_identifier" - }, - "list_premier_add_on_offers" : { - "sync": { - "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "list_skus" : { - "sync": { - "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "verify_hosting_environment_vnet" : { - "sync": { - "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2019_08_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2019_08_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "parameters" - }, - "move" : { - "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, move_resource_envelope" - }, - "validate" : { - "sync": { - "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2019_08_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2019_08_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, validate_request" - }, - "validate_move" : { - "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, move_resource_envelope" + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "operations": { + "get_publishing_user" : { + "sync": { + "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "update_publishing_user" : { + "sync": { + "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2019_08_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2019_08_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "user_details" + }, + "list_source_controls" : { + "sync": { + "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "get_source_control" : { + "sync": { + "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type" + }, + "update_source_control" : { + "sync": { + "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type, request_message" + }, + "list_billing_meters" : { + "sync": { + "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.BillingMeterCollection\"]:\n", + "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "billing_location, os_type" + }, + "check_name_availability" : { + "sync": { + "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", + "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name, type, is_fqdn" + }, + "get_subscription_deployment_locations" : { + "sync": { + "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_geo_regions" : { + "sync": { + "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" + }, + "list_site_identifiers_assigned_to_host_name" : { + "sync": { + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name_identifier" + }, + "list_premier_add_on_offers" : { + "sync": { + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", + "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_skus" : { + "sync": { + "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", + "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "verify_hosting_environment_vnet" : { + "sync": { + "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2019_08_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2019_08_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "parameters" + }, + "move" : { + "sync": { + "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + }, + "validate" : { + "sync": { + "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2019_08_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2019_08_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, validate_request" + }, + "validate_move" : { + "sync": { + "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + } } - }, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}" + } } \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_version.py new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_web_site_management_client.py index d2a9b010c694..5456ef25b0df 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_web_site_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import WebSiteManagementClientConfiguration from .operations import AppServiceCertificateOrdersOperations @@ -127,6 +128,24 @@ def __init__( self.resource_health_metadata = ResourceHealthMetadataOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_configuration.py index 8fef553016cc..823ae878264f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_web_site_management_client.py index 987d8f2f4a39..31932326ac44 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_web_site_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -124,6 +125,23 @@ def __init__( self.resource_health_metadata = ResourceHealthMetadataOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_certificate_orders_operations.py index d1a708eeffe2..c16350ae873d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_certificate_orders_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -162,7 +162,7 @@ async def validate_purchase_information( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -293,7 +293,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) @@ -347,7 +347,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -381,8 +381,8 @@ async def begin_create_or_update( :type certificate_distinguished_name: ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceCertificateOrder or the result of cls(response) @@ -485,7 +485,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -551,7 +551,7 @@ async def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -632,7 +632,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -697,7 +697,7 @@ async def get_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) @@ -753,7 +753,7 @@ async def _create_or_update_certificate_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -790,8 +790,8 @@ async def begin_create_or_update_certificate( :type key_vault_certificate: ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceCertificateResource or the result of cls(response) @@ -900,7 +900,7 @@ async def delete_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -970,7 +970,7 @@ async def update_certificate( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1043,7 +1043,7 @@ async def reissue( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1109,7 +1109,7 @@ async def renew( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1167,7 +1167,7 @@ async def resend_email( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1233,7 +1233,7 @@ async def resend_request_emails( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1299,7 +1299,7 @@ async def retrieve_site_seal( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteSeal', pipeline_response) @@ -1360,7 +1360,7 @@ async def verify_domain_ownership( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1418,7 +1418,7 @@ async def retrieve_certificate_actions( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateOrderAction]', pipeline_response) @@ -1479,7 +1479,7 @@ async def retrieve_certificate_email_history( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateEmail]', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_environments_operations.py index da1191572d00..f0e92b42ce61 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_environments_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -174,7 +174,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -235,7 +235,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) @@ -289,7 +289,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -326,8 +326,8 @@ async def begin_create_or_update( :type hosting_environment_envelope: ~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) @@ -420,7 +420,7 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -448,8 +448,8 @@ async def begin_delete( :type force_delete: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -557,7 +557,7 @@ async def update( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -641,7 +641,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -702,7 +702,7 @@ async def get_vip_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressResponse', pipeline_response) @@ -756,7 +756,7 @@ async def _change_vnet_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -790,8 +790,8 @@ async def begin_change_vnet( :type vnet_info: ~azure.mgmt.web.v2019_08_01.models.VirtualNetworkProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -853,7 +853,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -957,7 +957,7 @@ async def list_diagnostics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', pipeline_response) @@ -1022,7 +1022,7 @@ async def get_diagnostics_item( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostingEnvironmentDiagnostics', pipeline_response) @@ -1100,7 +1100,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1177,7 +1177,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1238,7 +1238,7 @@ async def get_multi_role_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -1292,7 +1292,7 @@ async def _create_or_update_multi_role_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1326,8 +1326,8 @@ async def begin_create_or_update_multi_role_pool( :type multi_role_pool_envelope: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -1438,7 +1438,7 @@ async def update_multi_role_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1524,7 +1524,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1601,7 +1601,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1678,7 +1678,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1755,7 +1755,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1816,7 +1816,7 @@ async def list_operations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Operation]', pipeline_response) @@ -1894,7 +1894,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1955,7 +1955,7 @@ async def reboot( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2000,7 +2000,7 @@ async def _resume_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2031,8 +2031,8 @@ async def begin_resume( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2086,7 +2086,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2205,7 +2205,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2287,7 +2287,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2335,7 +2335,7 @@ async def _suspend_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2366,8 +2366,8 @@ async def begin_suspend( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2421,7 +2421,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2548,7 +2548,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2625,7 +2625,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2690,7 +2690,7 @@ async def get_worker_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -2746,7 +2746,7 @@ async def _create_or_update_worker_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2783,8 +2783,8 @@ async def begin_create_or_update_worker_pool( :type worker_pool_envelope: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -2901,7 +2901,7 @@ async def update_worker_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2991,7 +2991,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3072,7 +3072,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3153,7 +3153,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3234,7 +3234,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_plans_operations.py index 3a1ff92cfd40..35b996d5e433 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_plans_operations.py @@ -108,7 +108,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -181,7 +181,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -242,7 +242,7 @@ async def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -298,7 +298,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -332,8 +332,8 @@ async def begin_create_or_update( :type app_service_plan: ~azure.mgmt.web.v2019_08_01.models.AppServicePlan :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServicePlan or the result of cls(response) @@ -436,7 +436,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -502,7 +502,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -567,7 +567,7 @@ async def list_capabilities( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Capability]', pipeline_response) @@ -636,7 +636,7 @@ async def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -705,7 +705,7 @@ async def delete_hybrid_connection( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -771,7 +771,7 @@ async def list_hybrid_connection_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -856,7 +856,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -917,7 +917,7 @@ async def get_hybrid_connection_plan_limit( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionLimits', pipeline_response) @@ -994,7 +994,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1062,7 +1062,7 @@ async def restart_web_apps( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1154,7 +1154,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1215,7 +1215,7 @@ async def get_server_farm_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -1298,7 +1298,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1359,7 +1359,7 @@ async def list_vnets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -1424,7 +1424,7 @@ async def get_vnet_from_server_farm( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1495,7 +1495,7 @@ async def get_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1572,7 +1572,7 @@ async def update_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1638,7 +1638,7 @@ async def list_routes_for_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetRoute]', pipeline_response) @@ -1707,7 +1707,7 @@ async def get_route_for_vnet( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1786,7 +1786,7 @@ async def create_or_update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1857,7 +1857,7 @@ async def delete_vnet_route( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1931,7 +1931,7 @@ async def update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1998,7 +1998,7 @@ async def reboot_worker( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificate_registration_provider_operations.py index 8dcb035b2d14..c2d7f858bd56 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificate_registration_provider_operations.py @@ -96,7 +96,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificates_operations.py index 027b4bd9c91a..1c843d292107 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificates_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -233,7 +233,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -302,7 +302,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -363,7 +363,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -429,7 +429,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_deleted_web_apps_operations.py index 67b144af1de1..d1ef3230cb2d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_deleted_web_apps_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -233,7 +233,7 @@ async def get_deleted_web_app_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeletedSite', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_diagnostics_operations.py index 4ab285ba62c4..3e46cdd6399c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_diagnostics_operations.py @@ -108,7 +108,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -188,7 +188,7 @@ async def get_hosting_environment_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -265,7 +265,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -345,7 +345,7 @@ async def get_site_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -422,7 +422,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -487,7 +487,7 @@ async def get_site_diagnostic_category( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -568,7 +568,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -637,7 +637,7 @@ async def get_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -721,7 +721,7 @@ async def execute_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -802,7 +802,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -871,7 +871,7 @@ async def get_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -955,7 +955,7 @@ async def execute_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) @@ -1036,7 +1036,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1120,7 +1120,7 @@ async def get_site_detector_response_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -1201,7 +1201,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1270,7 +1270,7 @@ async def get_site_diagnostic_category_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -1355,7 +1355,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1428,7 +1428,7 @@ async def get_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -1516,7 +1516,7 @@ async def execute_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -1601,7 +1601,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1674,7 +1674,7 @@ async def get_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -1762,7 +1762,7 @@ async def execute_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domain_registration_provider_operations.py index 767cc7b9410f..256f5f16ab83 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domain_registration_provider_operations.py @@ -96,7 +96,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domains_operations.py index 6c5edefb3d3a..770d42bf1267 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domains_operations.py @@ -93,7 +93,7 @@ async def check_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainAvailabilityCheckResult', pipeline_response) @@ -162,7 +162,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -215,7 +215,7 @@ async def get_control_center_sso_request( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainControlCenterSsoRequest', pipeline_response) @@ -295,7 +295,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -368,7 +368,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -429,7 +429,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Domain', pipeline_response) @@ -483,7 +483,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -517,8 +517,8 @@ async def begin_create_or_update( :type domain: ~azure.mgmt.web.v2019_08_01.models.Domain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Domain or the result of cls(response) @@ -627,7 +627,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -693,7 +693,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -774,7 +774,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -839,7 +839,7 @@ async def get_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -858,10 +858,10 @@ async def create_or_update_ownership_identifier( domain_ownership_identifier: "_models.DomainOwnershipIdentifier", **kwargs ) -> "_models.DomainOwnershipIdentifier": - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -913,7 +913,7 @@ async def create_or_update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -978,7 +978,7 @@ async def delete_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -994,10 +994,10 @@ async def update_ownership_identifier( domain_ownership_identifier: "_models.DomainOwnershipIdentifier", **kwargs ) -> "_models.DomainOwnershipIdentifier": - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1049,7 +1049,7 @@ async def update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -1110,7 +1110,7 @@ async def renew( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_provider_operations.py index 9490151aad56..35b181e473ec 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_provider_operations.py @@ -100,7 +100,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -166,7 +166,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_recommendations_operations.py index c0a35b9c6f49..17cd9a41b07d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_recommendations_operations.py @@ -112,7 +112,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -165,7 +165,7 @@ async def reset_all_filters( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -220,7 +220,7 @@ async def disable_recommendation_for_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -307,7 +307,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -396,7 +396,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -461,7 +461,7 @@ async def disable_all_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -523,7 +523,7 @@ async def reset_all_filters_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -597,7 +597,7 @@ async def get_rule_details_by_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -666,7 +666,7 @@ async def disable_recommendation_for_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -753,7 +753,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -842,7 +842,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -903,7 +903,7 @@ async def disable_all_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -961,7 +961,7 @@ async def reset_all_filters_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1035,7 +1035,7 @@ async def get_rule_details_by_web_app( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -1100,7 +1100,7 @@ async def disable_recommendation_for_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_resource_health_metadata_operations.py index 715790523135..c789b0b3d20a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_resource_health_metadata_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -173,7 +173,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -251,7 +251,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -312,7 +312,7 @@ async def get_by_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) @@ -394,7 +394,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -459,7 +459,7 @@ async def get_by_site_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_static_sites_operations.py index 369cdac16e05..0ddb189ee644 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_static_sites_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -233,7 +233,7 @@ async def get_static_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) @@ -303,7 +303,7 @@ async def create_or_update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -368,7 +368,7 @@ async def delete_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -435,7 +435,7 @@ async def update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -520,7 +520,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -589,7 +589,7 @@ async def delete_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -664,7 +664,7 @@ async def update_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserARMResource', pipeline_response) @@ -741,7 +741,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -806,7 +806,7 @@ async def get_static_site_build( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteBuildARMResource', pipeline_response) @@ -871,7 +871,7 @@ async def delete_static_site_build( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -941,7 +941,7 @@ async def create_or_update_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1026,7 +1026,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1091,7 +1091,7 @@ async def list_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1164,7 +1164,7 @@ async def create_or_update_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1237,7 +1237,7 @@ async def create_user_roles_invitation_link( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', pipeline_response) @@ -1314,7 +1314,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1380,7 +1380,7 @@ async def create_or_update_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1449,7 +1449,7 @@ async def delete_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1511,7 +1511,7 @@ async def validate_custom_domain_can_be_added_to_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1569,7 +1569,7 @@ async def detach_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1643,7 +1643,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1704,7 +1704,7 @@ async def list_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1769,7 +1769,7 @@ async def list_static_site_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1838,7 +1838,7 @@ async def reset_static_site_api_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_top_level_domains_operations.py index 315aa4e4c2c2..09b873e40a53 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_top_level_domains_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -156,7 +156,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TopLevelDomain', pipeline_response) @@ -240,7 +240,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_apps_operations.py index 3d8c3b304ba8..e1bd07566a91 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_apps_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -180,7 +180,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -241,7 +241,7 @@ async def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -297,7 +297,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -333,8 +333,8 @@ async def begin_create_or_update( :type site_envelope: ~azure.mgmt.web.v2019_08_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) @@ -448,7 +448,7 @@ async def delete( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -516,7 +516,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -586,7 +586,7 @@ async def analyze_custom_hostname( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -655,7 +655,7 @@ async def apply_slot_config_to_production( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -722,7 +722,7 @@ async def backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -799,7 +799,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -864,7 +864,7 @@ async def get_backup_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -929,7 +929,7 @@ async def delete_backup( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1001,7 +1001,7 @@ async def list_backup_status_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -1057,7 +1057,7 @@ async def _restore_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1087,8 +1087,8 @@ async def begin_restore( :type request: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -1191,7 +1191,7 @@ async def get_basic_publishing_credentials_policies( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', pipeline_response) @@ -1252,7 +1252,7 @@ async def get_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1321,7 +1321,7 @@ async def update_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1382,7 +1382,7 @@ async def get_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1451,7 +1451,7 @@ async def update_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1528,7 +1528,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1597,7 +1597,7 @@ async def update_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1658,7 +1658,7 @@ async def list_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1727,7 +1727,7 @@ async def update_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1788,7 +1788,7 @@ async def get_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1857,7 +1857,7 @@ async def update_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -1918,7 +1918,7 @@ async def list_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -1987,7 +1987,7 @@ async def update_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2048,7 +2048,7 @@ async def delete_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2106,7 +2106,7 @@ async def get_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2167,7 +2167,7 @@ async def get_app_settings_key_vault_references( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('KeyVaultReferenceCollection', pipeline_response) @@ -2232,7 +2232,7 @@ async def get_app_setting_key_vault_reference( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('KeyVaultReferenceResource', pipeline_response) @@ -2301,7 +2301,7 @@ async def update_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2362,7 +2362,7 @@ async def list_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2423,7 +2423,7 @@ async def get_diagnostic_logs_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2493,7 +2493,7 @@ async def update_diagnostic_logs_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2562,7 +2562,7 @@ async def update_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2623,7 +2623,7 @@ async def list_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2671,7 +2671,7 @@ async def _list_publishing_credentials_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -2698,8 +2698,8 @@ async def begin_list_publishing_credentials( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) @@ -2809,7 +2809,7 @@ async def update_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2870,7 +2870,7 @@ async def list_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2932,7 +2932,7 @@ async def list_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3002,7 +3002,7 @@ async def update_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3064,7 +3064,7 @@ async def get_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3133,7 +3133,7 @@ async def create_or_update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3202,7 +3202,7 @@ async def update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3280,7 +3280,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3345,7 +3345,7 @@ async def get_configuration_snapshot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3410,7 +3410,7 @@ async def recover_site_configuration_snapshot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3608,7 +3608,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3673,7 +3673,7 @@ async def get_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -3740,7 +3740,7 @@ async def delete_continuous_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3802,7 +3802,7 @@ async def start_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3864,7 +3864,7 @@ async def stop_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3938,7 +3938,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4003,7 +4003,7 @@ async def get_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4076,7 +4076,7 @@ async def create_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4141,7 +4141,7 @@ async def delete_deployment( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4204,7 +4204,7 @@ async def list_deployment_log( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4275,7 +4275,7 @@ async def discover_backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -4352,7 +4352,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4417,7 +4417,7 @@ async def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4491,7 +4491,7 @@ async def create_or_update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4556,7 +4556,7 @@ async def delete_domain_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4627,7 +4627,7 @@ async def update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4688,7 +4688,7 @@ async def get_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -4742,7 +4742,7 @@ async def _create_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -4774,8 +4774,8 @@ async def begin_create_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2019_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -4878,7 +4878,7 @@ async def get_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -4957,7 +4957,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5018,7 +5018,7 @@ async def get_functions_admin_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -5083,7 +5083,7 @@ async def get_function( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -5141,7 +5141,7 @@ async def _create_function_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -5174,8 +5174,8 @@ async def begin_create_function( :type function_envelope: ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -5284,7 +5284,7 @@ async def delete_function( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5358,7 +5358,7 @@ async def create_or_update_function_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5431,7 +5431,7 @@ async def delete_function_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5493,7 +5493,7 @@ async def list_function_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -5558,7 +5558,7 @@ async def list_function_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -5619,7 +5619,7 @@ async def list_host_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -5680,7 +5680,7 @@ async def list_sync_status( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5738,7 +5738,7 @@ async def sync_functions( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5812,7 +5812,7 @@ async def create_or_update_host_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5885,7 +5885,7 @@ async def delete_host_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5959,7 +5959,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6024,7 +6024,7 @@ async def get_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6098,7 +6098,7 @@ async def create_or_update_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6163,7 +6163,7 @@ async def delete_host_name_binding( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6229,7 +6229,7 @@ async def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6306,7 +6306,7 @@ async def create_or_update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6375,7 +6375,7 @@ async def delete_hybrid_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6449,7 +6449,7 @@ async def update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6510,7 +6510,7 @@ async def list_hybrid_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6572,7 +6572,7 @@ async def list_relay_service_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6637,7 +6637,7 @@ async def get_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6711,7 +6711,7 @@ async def create_or_update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6776,7 +6776,7 @@ async def delete_relay_service_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6847,7 +6847,7 @@ async def update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6924,7 +6924,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6989,7 +6989,7 @@ async def get_instance_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -7054,7 +7054,7 @@ async def get_instance_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -7110,7 +7110,7 @@ async def _create_instance_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7145,8 +7145,8 @@ async def begin_create_instance_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2019_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -7255,7 +7255,7 @@ async def get_instance_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7340,7 +7340,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7411,7 +7411,7 @@ async def get_instance_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7484,7 +7484,7 @@ async def delete_instance_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -7552,7 +7552,7 @@ async def get_instance_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7641,7 +7641,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7716,7 +7716,7 @@ async def get_instance_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7805,7 +7805,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7866,7 +7866,7 @@ async def is_cloneable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -7943,7 +7943,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8004,7 +8004,7 @@ async def list_sync_function_triggers( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -8060,7 +8060,7 @@ async def _migrate_storage_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) @@ -8093,8 +8093,8 @@ async def begin_migrate_storage( :type migration_options: ~azure.mgmt.web.v2019_08_01.models.StorageMigrationOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either StorageMigrationResponse or the result of cls(response) @@ -8191,7 +8191,7 @@ async def _migrate_my_sql_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Operation', pipeline_response) @@ -8221,8 +8221,8 @@ async def begin_migrate_my_sql( :type migration_request_envelope: ~azure.mgmt.web.v2019_08_01.models.MigrateMySqlRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Operation or the result of cls(response) @@ -8326,7 +8326,7 @@ async def get_migrate_my_sql_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -8387,7 +8387,7 @@ async def get_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8460,7 +8460,7 @@ async def create_or_update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8521,7 +8521,7 @@ async def delete_swift_virtual_network( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -8591,7 +8591,7 @@ async def update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8656,7 +8656,7 @@ async def list_network_features( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -8724,7 +8724,7 @@ async def get_network_trace_operation( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8804,7 +8804,7 @@ async def start_web_site_network_trace( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -8861,7 +8861,7 @@ async def _start_web_site_network_trace_operation_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8901,8 +8901,8 @@ async def begin_start_web_site_network_trace_operation( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -9007,7 +9007,7 @@ async def stop_web_site_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9070,7 +9070,7 @@ async def get_network_traces( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9136,7 +9136,7 @@ async def get_network_trace_operation_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -9206,7 +9206,7 @@ async def get_network_traces_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9268,7 +9268,7 @@ async def generate_new_site_publishing_password( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9349,7 +9349,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9410,7 +9410,7 @@ async def get_site_php_error_log_flag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -9471,7 +9471,7 @@ async def list_premier_add_ons( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9536,7 +9536,7 @@ async def get_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9609,7 +9609,7 @@ async def add_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9674,7 +9674,7 @@ async def delete_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9744,7 +9744,7 @@ async def update_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9806,7 +9806,7 @@ async def get_private_access( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -9876,7 +9876,7 @@ async def put_private_access_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -9954,7 +9954,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10020,7 +10020,7 @@ async def get_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10088,7 +10088,7 @@ async def delete_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10151,7 +10151,7 @@ async def get_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10235,7 +10235,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10305,7 +10305,7 @@ async def get_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10389,7 +10389,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10466,7 +10466,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10531,7 +10531,7 @@ async def get_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10605,7 +10605,7 @@ async def create_or_update_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10670,7 +10670,7 @@ async def delete_public_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10737,7 +10737,7 @@ async def list_publishing_profile_xml_with_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -10799,7 +10799,7 @@ async def reset_production_slot_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10869,7 +10869,7 @@ async def restart( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10920,7 +10920,7 @@ async def _restore_from_backup_blob_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10947,8 +10947,8 @@ async def begin_restore_from_backup_blob( :type request: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11041,7 +11041,7 @@ async def _restore_from_deleted_app_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11068,8 +11068,8 @@ async def begin_restore_from_deleted_app( :type restore_request: ~azure.mgmt.web.v2019_08_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11162,7 +11162,7 @@ async def _restore_snapshot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11190,8 +11190,8 @@ async def begin_restore_snapshot( :type restore_request: ~azure.mgmt.web.v2019_08_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11307,7 +11307,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11372,7 +11372,7 @@ async def get_site_extension( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11424,7 +11424,7 @@ async def _install_site_extension_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11459,8 +11459,8 @@ async def begin_install_site_extension( :type site_extension_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -11568,7 +11568,7 @@ async def delete_site_extension( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11619,7 +11619,7 @@ async def _copy_production_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11647,8 +11647,8 @@ async def begin_copy_production_slot( :type copy_slot_entity: ~azure.mgmt.web.v2019_08_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11764,7 +11764,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11829,7 +11829,7 @@ async def get_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11887,7 +11887,7 @@ async def _create_or_update_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -11927,8 +11927,8 @@ async def begin_create_or_update_slot( :type site_envelope: ~azure.mgmt.web.v2019_08_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) @@ -12050,7 +12050,7 @@ async def delete_slot( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12123,7 +12123,7 @@ async def update_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -12197,7 +12197,7 @@ async def analyze_custom_hostname_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -12271,7 +12271,7 @@ async def apply_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12343,7 +12343,7 @@ async def backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12425,7 +12425,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12495,7 +12495,7 @@ async def get_backup_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12565,7 +12565,7 @@ async def delete_backup_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12641,7 +12641,7 @@ async def list_backup_status_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12699,7 +12699,7 @@ async def _restore_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12733,8 +12733,8 @@ async def begin_restore_slot( :type request: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -12859,7 +12859,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12933,7 +12933,7 @@ async def update_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -12999,7 +12999,7 @@ async def list_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13072,7 +13072,7 @@ async def update_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13138,7 +13138,7 @@ async def get_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13212,7 +13212,7 @@ async def update_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13278,7 +13278,7 @@ async def list_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13352,7 +13352,7 @@ async def update_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13418,7 +13418,7 @@ async def delete_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -13481,7 +13481,7 @@ async def get_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13555,7 +13555,7 @@ async def update_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13621,7 +13621,7 @@ async def list_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13687,7 +13687,7 @@ async def get_diagnostic_logs_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13762,7 +13762,7 @@ async def update_diagnostic_logs_config_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13836,7 +13836,7 @@ async def update_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13902,7 +13902,7 @@ async def list_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13952,7 +13952,7 @@ async def _list_publishing_credentials_slot_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -13983,8 +13983,8 @@ async def begin_list_publishing_credentials_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) @@ -14100,7 +14100,7 @@ async def update_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14165,7 +14165,7 @@ async def list_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14232,7 +14232,7 @@ async def get_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14306,7 +14306,7 @@ async def create_or_update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14380,7 +14380,7 @@ async def update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14463,7 +14463,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14533,7 +14533,7 @@ async def get_configuration_snapshot_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14603,7 +14603,7 @@ async def recover_site_configuration_snapshot_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -14814,7 +14814,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14884,7 +14884,7 @@ async def get_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -14956,7 +14956,7 @@ async def delete_continuous_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15023,7 +15023,7 @@ async def start_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15090,7 +15090,7 @@ async def stop_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15169,7 +15169,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15239,7 +15239,7 @@ async def get_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15317,7 +15317,7 @@ async def create_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15387,7 +15387,7 @@ async def delete_deployment_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15455,7 +15455,7 @@ async def list_deployment_log_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15531,7 +15531,7 @@ async def discover_backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -15613,7 +15613,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15683,7 +15683,7 @@ async def get_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15762,7 +15762,7 @@ async def create_or_update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15832,7 +15832,7 @@ async def delete_domain_ownership_identifier_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15908,7 +15908,7 @@ async def update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15973,7 +15973,7 @@ async def get_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -16029,7 +16029,7 @@ async def _create_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16064,8 +16064,8 @@ async def begin_create_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2019_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -16174,7 +16174,7 @@ async def get_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16257,7 +16257,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16322,7 +16322,7 @@ async def get_functions_admin_token_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -16391,7 +16391,7 @@ async def get_instance_function_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16451,7 +16451,7 @@ async def _create_instance_function_slot_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -16487,8 +16487,8 @@ async def begin_create_instance_function_slot( :type function_envelope: ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -16603,7 +16603,7 @@ async def delete_instance_function_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16681,7 +16681,7 @@ async def create_or_update_function_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -16758,7 +16758,7 @@ async def delete_function_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16824,7 +16824,7 @@ async def list_function_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -16893,7 +16893,7 @@ async def list_function_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -16958,7 +16958,7 @@ async def list_host_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -17023,7 +17023,7 @@ async def list_sync_status_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17085,7 +17085,7 @@ async def sync_functions_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17163,7 +17163,7 @@ async def create_or_update_host_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -17240,7 +17240,7 @@ async def delete_host_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17319,7 +17319,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17389,7 +17389,7 @@ async def get_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17468,7 +17468,7 @@ async def create_or_update_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17538,7 +17538,7 @@ async def delete_host_name_binding_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17608,7 +17608,7 @@ async def get_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17689,7 +17689,7 @@ async def create_or_update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17762,7 +17762,7 @@ async def delete_hybrid_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17840,7 +17840,7 @@ async def update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17905,7 +17905,7 @@ async def list_hybrid_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17972,7 +17972,7 @@ async def list_relay_service_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18042,7 +18042,7 @@ async def get_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18121,7 +18121,7 @@ async def create_or_update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18191,7 +18191,7 @@ async def delete_relay_service_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18267,7 +18267,7 @@ async def update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18349,7 +18349,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -18419,7 +18419,7 @@ async def get_instance_info_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -18488,7 +18488,7 @@ async def get_instance_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -18546,7 +18546,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -18584,8 +18584,8 @@ async def begin_create_instance_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2019_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -18700,7 +18700,7 @@ async def get_instance_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -18790,7 +18790,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -18866,7 +18866,7 @@ async def get_instance_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -18944,7 +18944,7 @@ async def delete_instance_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -19017,7 +19017,7 @@ async def get_instance_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19111,7 +19111,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19191,7 +19191,7 @@ async def get_instance_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19285,7 +19285,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19351,7 +19351,7 @@ async def is_cloneable_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -19433,7 +19433,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19498,7 +19498,7 @@ async def list_sync_function_triggers_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -19564,7 +19564,7 @@ async def get_migrate_my_sql_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -19630,7 +19630,7 @@ async def get_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19708,7 +19708,7 @@ async def create_or_update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19774,7 +19774,7 @@ async def delete_swift_virtual_network_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -19849,7 +19849,7 @@ async def update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19919,7 +19919,7 @@ async def list_network_features_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19992,7 +19992,7 @@ async def get_network_trace_operation_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20076,7 +20076,7 @@ async def start_web_site_network_trace_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -20135,7 +20135,7 @@ async def _start_web_site_network_trace_operation_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20178,8 +20178,8 @@ async def begin_start_web_site_network_trace_operation_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -20290,7 +20290,7 @@ async def stop_web_site_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20358,7 +20358,7 @@ async def get_network_traces_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20429,7 +20429,7 @@ async def get_network_trace_operation_slot_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20504,7 +20504,7 @@ async def get_network_traces_slot_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20571,7 +20571,7 @@ async def generate_new_site_publishing_password_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20656,7 +20656,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -20721,7 +20721,7 @@ async def get_site_php_error_log_flag_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -20787,7 +20787,7 @@ async def list_premier_add_ons_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -20857,7 +20857,7 @@ async def get_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -20935,7 +20935,7 @@ async def add_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21005,7 +21005,7 @@ async def delete_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -21080,7 +21080,7 @@ async def update_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21146,7 +21146,7 @@ async def get_private_access_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21220,7 +21220,7 @@ async def put_private_access_vnet_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21285,7 +21285,7 @@ async def get_private_endpoint_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) @@ -21341,7 +21341,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21378,8 +21378,8 @@ async def begin_approve_or_reject_private_endpoint_connection( :type private_endpoint_wrapper: ~azure.mgmt.web.v2019_08_01.models.PrivateLinkConnectionApprovalRequestResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnectionResource or the result of cls(response) @@ -21473,7 +21473,7 @@ async def _delete_private_endpoint_connection_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21510,8 +21510,8 @@ async def begin_delete_private_endpoint_connection( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either object or the result of cls(response) @@ -21615,7 +21615,7 @@ async def get_private_link_resources( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) @@ -21698,7 +21698,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21769,7 +21769,7 @@ async def get_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -21842,7 +21842,7 @@ async def delete_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -21910,7 +21910,7 @@ async def get_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -21999,7 +21999,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22074,7 +22074,7 @@ async def get_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22163,7 +22163,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22245,7 +22245,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22315,7 +22315,7 @@ async def get_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22394,7 +22394,7 @@ async def create_or_update_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22464,7 +22464,7 @@ async def delete_public_certificate_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22536,7 +22536,7 @@ async def list_publishing_profile_xml_with_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -22603,7 +22603,7 @@ async def reset_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22678,7 +22678,7 @@ async def restart_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22731,7 +22731,7 @@ async def _restore_from_backup_blob_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22762,8 +22762,8 @@ async def begin_restore_from_backup_blob_slot( :type request: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -22860,7 +22860,7 @@ async def _restore_from_deleted_app_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22890,8 +22890,8 @@ async def begin_restore_from_deleted_app_slot( :type restore_request: ~azure.mgmt.web.v2019_08_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -22988,7 +22988,7 @@ async def _restore_snapshot_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23019,8 +23019,8 @@ async def begin_restore_snapshot_slot( :type restore_request: ~azure.mgmt.web.v2019_08_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23143,7 +23143,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23213,7 +23213,7 @@ async def get_site_extension_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23267,7 +23267,7 @@ async def _install_site_extension_slot_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23306,8 +23306,8 @@ async def begin_install_site_extension_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -23422,7 +23422,7 @@ async def delete_site_extension_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23475,7 +23475,7 @@ async def _copy_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23507,8 +23507,8 @@ async def begin_copy_slot( :type copy_slot_entity: ~azure.mgmt.web.v2019_08_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23642,7 +23642,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23698,7 +23698,7 @@ async def _swap_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23729,8 +23729,8 @@ async def begin_swap_slot( :type slot_swap_entity: ~azure.mgmt.web.v2019_08_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23852,7 +23852,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23933,7 +23933,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23999,7 +23999,7 @@ async def get_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24062,7 +24062,7 @@ async def _create_or_update_source_control_slot_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24103,8 +24103,8 @@ async def begin_create_or_update_source_control_slot( :type site_source_control: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) @@ -24214,7 +24214,7 @@ async def delete_source_control_slot( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24285,7 +24285,7 @@ async def update_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24358,7 +24358,7 @@ async def start_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24414,7 +24414,7 @@ async def _start_network_trace_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24457,8 +24457,8 @@ async def begin_start_network_trace_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -24570,7 +24570,7 @@ async def stop_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24632,7 +24632,7 @@ async def stop_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24694,7 +24694,7 @@ async def sync_repository_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24756,7 +24756,7 @@ async def sync_function_triggers_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24835,7 +24835,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24905,7 +24905,7 @@ async def get_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -24977,7 +24977,7 @@ async def delete_triggered_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25060,7 +25060,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25135,7 +25135,7 @@ async def get_triggered_web_job_history_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25207,7 +25207,7 @@ async def run_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25294,7 +25294,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25360,7 +25360,7 @@ async def list_vnet_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -25430,7 +25430,7 @@ async def get_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25509,7 +25509,7 @@ async def create_or_update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25580,7 +25580,7 @@ async def delete_vnet_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25656,7 +25656,7 @@ async def update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25730,7 +25730,7 @@ async def get_vnet_connection_gateway_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25814,7 +25814,7 @@ async def create_or_update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -25896,7 +25896,7 @@ async def update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -25978,7 +25978,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26048,7 +26048,7 @@ async def get_web_job_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) @@ -26136,7 +26136,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26190,7 +26190,7 @@ async def _swap_slot_with_production_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26217,8 +26217,8 @@ async def begin_swap_slot_with_production( :type slot_swap_entity: ~azure.mgmt.web.v2019_08_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -26334,7 +26334,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26411,7 +26411,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26472,7 +26472,7 @@ async def get_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26533,7 +26533,7 @@ async def _create_or_update_source_control_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26570,8 +26570,8 @@ async def begin_create_or_update_source_control( :type site_source_control: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) @@ -26674,7 +26674,7 @@ async def delete_source_control( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26740,7 +26740,7 @@ async def update_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26808,7 +26808,7 @@ async def start( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26862,7 +26862,7 @@ async def _start_network_trace_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26902,8 +26902,8 @@ async def begin_start_network_trace( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -27008,7 +27008,7 @@ async def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27066,7 +27066,7 @@ async def stop_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27124,7 +27124,7 @@ async def sync_repository( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27182,7 +27182,7 @@ async def sync_function_triggers( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27256,7 +27256,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27321,7 +27321,7 @@ async def get_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -27388,7 +27388,7 @@ async def delete_triggered_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27466,7 +27466,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27536,7 +27536,7 @@ async def get_triggered_web_job_history( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -27603,7 +27603,7 @@ async def run_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27685,7 +27685,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27746,7 +27746,7 @@ async def list_vnet_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -27811,7 +27811,7 @@ async def get_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -27885,7 +27885,7 @@ async def create_or_update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -27951,7 +27951,7 @@ async def delete_vnet_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28022,7 +28022,7 @@ async def update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28091,7 +28091,7 @@ async def get_vnet_connection_gateway( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -28170,7 +28170,7 @@ async def create_or_update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28247,7 +28247,7 @@ async def update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28324,7 +28324,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28389,7 +28389,7 @@ async def get_web_job( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_site_management_client_operations.py index 7b9a777899ba..6d2a0a5670f8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_site_management_client_operations.py @@ -59,7 +59,7 @@ async def get_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -116,7 +116,7 @@ async def update_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -181,7 +181,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -237,7 +237,7 @@ async def get_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -301,7 +301,7 @@ async def update_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -380,7 +380,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -449,7 +449,7 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceNameAvailability', pipeline_response) @@ -502,7 +502,7 @@ async def get_subscription_deployment_locations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeploymentLocations', pipeline_response) @@ -594,7 +594,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -674,7 +674,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -743,7 +743,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -796,7 +796,7 @@ async def list_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SkuInfos', pipeline_response) @@ -858,7 +858,7 @@ async def verify_hosting_environment_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetValidationFailureDetails', pipeline_response) @@ -923,7 +923,7 @@ async def move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -985,7 +985,7 @@ async def validate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateResponse', pipeline_response) @@ -1050,7 +1050,7 @@ async def validate_move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/models/_models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/models/_models.py index a13d737ac147..0dd0c7a4ac5d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/models/_models.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/models/_models.py @@ -3819,8 +3819,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] :param support_credentials: Gets or sets whether CORS requests with credentials are allowed. @@ -5672,8 +5672,8 @@ class DomainControlCenterSsoRequest(msrest.serialization.Model): :vartype url: str :ivar post_parameter_key: Post parameter key. :vartype post_parameter_key: str - :ivar post_parameter_value: Post parameter value. Client should use 'application/x-www-form- - urlencoded' encoding for this value. + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. :vartype post_parameter_value: str """ @@ -10399,8 +10399,8 @@ class Site(Resource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -10616,8 +10616,8 @@ class SiteAuthSettings(ProxyOnlyResource): When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. - More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect- - discovery-1_0.html. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. :type issuer: str :param validate_issuer: Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. @@ -10681,8 +10681,8 @@ class SiteAuthSettings(ProxyOnlyResource): :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. - Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en- - us/library/dn631845.aspx. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. :type microsoft_account_o_auth_scopes: list[str] """ @@ -11854,8 +11854,8 @@ class SitePatchResource(ProxyOnlyResource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -14829,8 +14829,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str :param is_swift: Flag that is used to denote if this is VNET injection. :type is_swift: bool diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/models/_models_py3.py index a1006c8a10b6..a61f8561f41c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/models/_models_py3.py @@ -4208,8 +4208,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] :param support_credentials: Gets or sets whether CORS requests with credentials are allowed. @@ -6242,8 +6242,8 @@ class DomainControlCenterSsoRequest(msrest.serialization.Model): :vartype url: str :ivar post_parameter_key: Post parameter key. :vartype post_parameter_key: str - :ivar post_parameter_value: Post parameter value. Client should use 'application/x-www-form- - urlencoded' encoding for this value. + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. :vartype post_parameter_value: str """ @@ -11502,8 +11502,8 @@ class Site(Resource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -11742,8 +11742,8 @@ class SiteAuthSettings(ProxyOnlyResource): When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. - More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect- - discovery-1_0.html. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. :type issuer: str :param validate_issuer: Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. @@ -11807,8 +11807,8 @@ class SiteAuthSettings(ProxyOnlyResource): :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. - Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en- - us/library/dn631845.aspx. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. :type microsoft_account_o_auth_scopes: list[str] """ @@ -13177,8 +13177,8 @@ class SitePatchResource(ProxyOnlyResource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -16460,8 +16460,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str :param is_swift: Flag that is used to denote if this is VNET injection. :type is_swift: bool diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py index e8373376f9ba..ba56d85a2b8a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -168,7 +168,7 @@ def validate_purchase_information( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -239,7 +239,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -301,7 +301,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) @@ -356,7 +356,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -391,8 +391,8 @@ def begin_create_or_update( :type certificate_distinguished_name: ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceCertificateOrder or the result of cls(response) @@ -496,7 +496,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -563,7 +563,7 @@ def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -645,7 +645,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -711,7 +711,7 @@ def get_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) @@ -768,7 +768,7 @@ def _create_or_update_certificate_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -806,8 +806,8 @@ def begin_create_or_update_certificate( :type key_vault_certificate: ~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceCertificateResource or the result of cls(response) @@ -917,7 +917,7 @@ def delete_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -988,7 +988,7 @@ def update_certificate( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1062,7 +1062,7 @@ def reissue( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1129,7 +1129,7 @@ def renew( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1188,7 +1188,7 @@ def resend_email( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1255,7 +1255,7 @@ def resend_request_emails( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1322,7 +1322,7 @@ def retrieve_site_seal( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteSeal', pipeline_response) @@ -1384,7 +1384,7 @@ def verify_domain_ownership( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1443,7 +1443,7 @@ def retrieve_certificate_actions( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateOrderAction]', pipeline_response) @@ -1505,7 +1505,7 @@ def retrieve_certificate_email_history( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateEmail]', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_environments_operations.py index 0cafb2fef5cf..b1356a5af0f8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_environments_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -180,7 +180,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -242,7 +242,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) @@ -297,7 +297,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -335,8 +335,8 @@ def begin_create_or_update( :type hosting_environment_envelope: ~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) @@ -430,7 +430,7 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -459,8 +459,8 @@ def begin_delete( :type force_delete: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -569,7 +569,7 @@ def update( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -654,7 +654,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -716,7 +716,7 @@ def get_vip_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressResponse', pipeline_response) @@ -771,7 +771,7 @@ def _change_vnet_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -806,8 +806,8 @@ def begin_change_vnet( :type vnet_info: ~azure.mgmt.web.v2019_08_01.models.VirtualNetworkProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -869,7 +869,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -974,7 +974,7 @@ def list_diagnostics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', pipeline_response) @@ -1040,7 +1040,7 @@ def get_diagnostics_item( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostingEnvironmentDiagnostics', pipeline_response) @@ -1119,7 +1119,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1197,7 +1197,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1259,7 +1259,7 @@ def get_multi_role_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -1314,7 +1314,7 @@ def _create_or_update_multi_role_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1349,8 +1349,8 @@ def begin_create_or_update_multi_role_pool( :type multi_role_pool_envelope: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -1462,7 +1462,7 @@ def update_multi_role_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1549,7 +1549,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1627,7 +1627,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1705,7 +1705,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1783,7 +1783,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1845,7 +1845,7 @@ def list_operations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Operation]', pipeline_response) @@ -1924,7 +1924,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1986,7 +1986,7 @@ def reboot( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2032,7 +2032,7 @@ def _resume_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2064,8 +2064,8 @@ def begin_resume( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2119,7 +2119,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2239,7 +2239,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2322,7 +2322,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2371,7 +2371,7 @@ def _suspend_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2403,8 +2403,8 @@ def begin_suspend( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2458,7 +2458,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2586,7 +2586,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2664,7 +2664,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2730,7 +2730,7 @@ def get_worker_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -2787,7 +2787,7 @@ def _create_or_update_worker_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2825,8 +2825,8 @@ def begin_create_or_update_worker_pool( :type worker_pool_envelope: ~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -2944,7 +2944,7 @@ def update_worker_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -3035,7 +3035,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3117,7 +3117,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3199,7 +3199,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3281,7 +3281,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_plans_operations.py index d9b8dc10e210..edfc6c1549a4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_plans_operations.py @@ -113,7 +113,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -187,7 +187,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -249,7 +249,7 @@ def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -306,7 +306,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -341,8 +341,8 @@ def begin_create_or_update( :type app_service_plan: ~azure.mgmt.web.v2019_08_01.models.AppServicePlan :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServicePlan or the result of cls(response) @@ -446,7 +446,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -513,7 +513,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -579,7 +579,7 @@ def list_capabilities( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Capability]', pipeline_response) @@ -649,7 +649,7 @@ def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -719,7 +719,7 @@ def delete_hybrid_connection( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -786,7 +786,7 @@ def list_hybrid_connection_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -872,7 +872,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -934,7 +934,7 @@ def get_hybrid_connection_plan_limit( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionLimits', pipeline_response) @@ -1012,7 +1012,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1081,7 +1081,7 @@ def restart_web_apps( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1174,7 +1174,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1236,7 +1236,7 @@ def get_server_farm_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -1320,7 +1320,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1382,7 +1382,7 @@ def list_vnets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -1448,7 +1448,7 @@ def get_vnet_from_server_farm( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1520,7 +1520,7 @@ def get_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1598,7 +1598,7 @@ def update_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1665,7 +1665,7 @@ def list_routes_for_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetRoute]', pipeline_response) @@ -1735,7 +1735,7 @@ def get_route_for_vnet( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1815,7 +1815,7 @@ def create_or_update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1887,7 +1887,7 @@ def delete_vnet_route( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1962,7 +1962,7 @@ def update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -2030,7 +2030,7 @@ def reboot_worker( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificate_registration_provider_operations.py index bc8e676dae6d..cfdd1c54a94c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificate_registration_provider_operations.py @@ -101,7 +101,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificates_operations.py index c6e2dcb3a7f9..2b276bfdee04 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificates_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -310,7 +310,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -372,7 +372,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -439,7 +439,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_deleted_web_apps_operations.py index 62e295db63a5..e4eaacbf7eed 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_deleted_web_apps_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ def get_deleted_web_app_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeletedSite', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_diagnostics_operations.py index 7eaa409e586d..99217942b438 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_diagnostics_operations.py @@ -113,7 +113,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -194,7 +194,7 @@ def get_hosting_environment_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -272,7 +272,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -353,7 +353,7 @@ def get_site_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -431,7 +431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -497,7 +497,7 @@ def get_site_diagnostic_category( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -579,7 +579,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -649,7 +649,7 @@ def get_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -734,7 +734,7 @@ def execute_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -816,7 +816,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -886,7 +886,7 @@ def get_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -971,7 +971,7 @@ def execute_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) @@ -1053,7 +1053,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1138,7 +1138,7 @@ def get_site_detector_response_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -1220,7 +1220,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1290,7 +1290,7 @@ def get_site_diagnostic_category_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -1376,7 +1376,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1450,7 +1450,7 @@ def get_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -1539,7 +1539,7 @@ def execute_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -1625,7 +1625,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1699,7 +1699,7 @@ def get_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -1788,7 +1788,7 @@ def execute_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domain_registration_provider_operations.py index 27cc003849c0..8e7ceed7c1b3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domain_registration_provider_operations.py @@ -101,7 +101,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domains_operations.py index a4812b2f64c9..38e01ae7f8ce 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domains_operations.py @@ -98,7 +98,7 @@ def check_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainAvailabilityCheckResult', pipeline_response) @@ -168,7 +168,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -222,7 +222,7 @@ def get_control_center_sso_request( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainControlCenterSsoRequest', pipeline_response) @@ -303,7 +303,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -377,7 +377,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -439,7 +439,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Domain', pipeline_response) @@ -494,7 +494,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -529,8 +529,8 @@ def begin_create_or_update( :type domain: ~azure.mgmt.web.v2019_08_01.models.Domain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Domain or the result of cls(response) @@ -640,7 +640,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -707,7 +707,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -789,7 +789,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -855,7 +855,7 @@ def get_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -875,10 +875,10 @@ def create_or_update_ownership_identifier( **kwargs # type: Any ): # type: (...) -> "_models.DomainOwnershipIdentifier" - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -930,7 +930,7 @@ def create_or_update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -996,7 +996,7 @@ def delete_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1013,10 +1013,10 @@ def update_ownership_identifier( **kwargs # type: Any ): # type: (...) -> "_models.DomainOwnershipIdentifier" - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1068,7 +1068,7 @@ def update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -1130,7 +1130,7 @@ def renew( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_provider_operations.py index e1659e89af24..de2763040927 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_provider_operations.py @@ -105,7 +105,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -247,7 +247,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_recommendations_operations.py index a256ef7e9e00..a68a46b758d0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_recommendations_operations.py @@ -117,7 +117,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -171,7 +171,7 @@ def reset_all_filters( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -227,7 +227,7 @@ def disable_recommendation_for_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -315,7 +315,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -405,7 +405,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -471,7 +471,7 @@ def disable_all_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -534,7 +534,7 @@ def reset_all_filters_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -609,7 +609,7 @@ def get_rule_details_by_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -679,7 +679,7 @@ def disable_recommendation_for_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -767,7 +767,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -857,7 +857,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -919,7 +919,7 @@ def disable_all_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -978,7 +978,7 @@ def reset_all_filters_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1053,7 +1053,7 @@ def get_rule_details_by_web_app( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -1119,7 +1119,7 @@ def disable_recommendation_for_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_resource_health_metadata_operations.py index e95e0c95cb56..8dbd5b50df6f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_resource_health_metadata_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -179,7 +179,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -258,7 +258,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -320,7 +320,7 @@ def get_by_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) @@ -403,7 +403,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -469,7 +469,7 @@ def get_by_site_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_static_sites_operations.py index 6b770ea2cf62..9d448e0d568c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_static_sites_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ def get_static_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) @@ -311,7 +311,7 @@ def create_or_update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -377,7 +377,7 @@ def delete_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -445,7 +445,7 @@ def update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -531,7 +531,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -601,7 +601,7 @@ def delete_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -677,7 +677,7 @@ def update_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserARMResource', pipeline_response) @@ -755,7 +755,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -821,7 +821,7 @@ def get_static_site_build( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteBuildARMResource', pipeline_response) @@ -887,7 +887,7 @@ def delete_static_site_build( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -958,7 +958,7 @@ def create_or_update_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1044,7 +1044,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1110,7 +1110,7 @@ def list_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1184,7 +1184,7 @@ def create_or_update_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1258,7 +1258,7 @@ def create_user_roles_invitation_link( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', pipeline_response) @@ -1336,7 +1336,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1403,7 +1403,7 @@ def create_or_update_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1473,7 +1473,7 @@ def delete_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1536,7 +1536,7 @@ def validate_custom_domain_can_be_added_to_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1595,7 +1595,7 @@ def detach_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1670,7 +1670,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1732,7 +1732,7 @@ def list_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1798,7 +1798,7 @@ def list_static_site_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1868,7 +1868,7 @@ def reset_static_site_api_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_top_level_domains_operations.py index bea9d9ef42ee..ec2c0834f1f6 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_top_level_domains_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -162,7 +162,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TopLevelDomain', pipeline_response) @@ -247,7 +247,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_apps_operations.py index 2bc0e23883e0..132f8abb1b07 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_apps_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -186,7 +186,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -248,7 +248,7 @@ def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -305,7 +305,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -342,8 +342,8 @@ def begin_create_or_update( :type site_envelope: ~azure.mgmt.web.v2019_08_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Site or the result of cls(response) @@ -458,7 +458,7 @@ def delete( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -527,7 +527,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -598,7 +598,7 @@ def analyze_custom_hostname( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -668,7 +668,7 @@ def apply_slot_config_to_production( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -736,7 +736,7 @@ def backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -814,7 +814,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -880,7 +880,7 @@ def get_backup_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -946,7 +946,7 @@ def delete_backup( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1019,7 +1019,7 @@ def list_backup_status_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -1076,7 +1076,7 @@ def _restore_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1107,8 +1107,8 @@ def begin_restore( :type request: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -1212,7 +1212,7 @@ def get_basic_publishing_credentials_policies( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', pipeline_response) @@ -1274,7 +1274,7 @@ def get_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1344,7 +1344,7 @@ def update_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1406,7 +1406,7 @@ def get_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1476,7 +1476,7 @@ def update_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1554,7 +1554,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1624,7 +1624,7 @@ def update_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1686,7 +1686,7 @@ def list_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1756,7 +1756,7 @@ def update_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1818,7 +1818,7 @@ def get_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1888,7 +1888,7 @@ def update_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -1950,7 +1950,7 @@ def list_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -2020,7 +2020,7 @@ def update_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2082,7 +2082,7 @@ def delete_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2141,7 +2141,7 @@ def get_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2203,7 +2203,7 @@ def get_app_settings_key_vault_references( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('KeyVaultReferenceCollection', pipeline_response) @@ -2269,7 +2269,7 @@ def get_app_setting_key_vault_reference( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('KeyVaultReferenceResource', pipeline_response) @@ -2339,7 +2339,7 @@ def update_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2401,7 +2401,7 @@ def list_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2463,7 +2463,7 @@ def get_diagnostic_logs_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2534,7 +2534,7 @@ def update_diagnostic_logs_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2604,7 +2604,7 @@ def update_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2666,7 +2666,7 @@ def list_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2715,7 +2715,7 @@ def _list_publishing_credentials_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -2743,8 +2743,8 @@ def begin_list_publishing_credentials( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either User or the result of cls(response) @@ -2855,7 +2855,7 @@ def update_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2917,7 +2917,7 @@ def list_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2980,7 +2980,7 @@ def list_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3051,7 +3051,7 @@ def update_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3114,7 +3114,7 @@ def get_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3184,7 +3184,7 @@ def create_or_update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3254,7 +3254,7 @@ def update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3333,7 +3333,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3399,7 +3399,7 @@ def get_configuration_snapshot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3465,7 +3465,7 @@ def recover_site_configuration_snapshot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3666,7 +3666,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3732,7 +3732,7 @@ def get_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -3800,7 +3800,7 @@ def delete_continuous_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3863,7 +3863,7 @@ def start_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3926,7 +3926,7 @@ def stop_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4001,7 +4001,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4067,7 +4067,7 @@ def get_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4141,7 +4141,7 @@ def create_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4207,7 +4207,7 @@ def delete_deployment( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4271,7 +4271,7 @@ def list_deployment_log( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4343,7 +4343,7 @@ def discover_backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -4421,7 +4421,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4487,7 +4487,7 @@ def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4562,7 +4562,7 @@ def create_or_update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4628,7 +4628,7 @@ def delete_domain_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4700,7 +4700,7 @@ def update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4762,7 +4762,7 @@ def get_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -4817,7 +4817,7 @@ def _create_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -4850,8 +4850,8 @@ def begin_create_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2019_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -4955,7 +4955,7 @@ def get_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -5035,7 +5035,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5097,7 +5097,7 @@ def get_functions_admin_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -5163,7 +5163,7 @@ def get_function( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -5222,7 +5222,7 @@ def _create_function_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -5256,8 +5256,8 @@ def begin_create_function( :type function_envelope: ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -5367,7 +5367,7 @@ def delete_function( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5442,7 +5442,7 @@ def create_or_update_function_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5516,7 +5516,7 @@ def delete_function_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5579,7 +5579,7 @@ def list_function_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -5645,7 +5645,7 @@ def list_function_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -5707,7 +5707,7 @@ def list_host_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -5769,7 +5769,7 @@ def list_sync_status( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5828,7 +5828,7 @@ def sync_functions( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5903,7 +5903,7 @@ def create_or_update_host_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5977,7 +5977,7 @@ def delete_host_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6052,7 +6052,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6118,7 +6118,7 @@ def get_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6193,7 +6193,7 @@ def create_or_update_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6259,7 +6259,7 @@ def delete_host_name_binding( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6326,7 +6326,7 @@ def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6404,7 +6404,7 @@ def create_or_update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6474,7 +6474,7 @@ def delete_hybrid_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6549,7 +6549,7 @@ def update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6611,7 +6611,7 @@ def list_hybrid_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6674,7 +6674,7 @@ def list_relay_service_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6740,7 +6740,7 @@ def get_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6815,7 +6815,7 @@ def create_or_update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6881,7 +6881,7 @@ def delete_relay_service_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6953,7 +6953,7 @@ def update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -7031,7 +7031,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7097,7 +7097,7 @@ def get_instance_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -7163,7 +7163,7 @@ def get_instance_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -7220,7 +7220,7 @@ def _create_instance_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7256,8 +7256,8 @@ def begin_create_instance_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2019_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -7367,7 +7367,7 @@ def get_instance_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7453,7 +7453,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7525,7 +7525,7 @@ def get_instance_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7599,7 +7599,7 @@ def delete_instance_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -7668,7 +7668,7 @@ def get_instance_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7758,7 +7758,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7834,7 +7834,7 @@ def get_instance_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7924,7 +7924,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7986,7 +7986,7 @@ def is_cloneable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -8064,7 +8064,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8126,7 +8126,7 @@ def list_sync_function_triggers( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -8183,7 +8183,7 @@ def _migrate_storage_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) @@ -8217,8 +8217,8 @@ def begin_migrate_storage( :type migration_options: ~azure.mgmt.web.v2019_08_01.models.StorageMigrationOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either StorageMigrationResponse or the result of cls(response) @@ -8316,7 +8316,7 @@ def _migrate_my_sql_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Operation', pipeline_response) @@ -8347,8 +8347,8 @@ def begin_migrate_my_sql( :type migration_request_envelope: ~azure.mgmt.web.v2019_08_01.models.MigrateMySqlRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Operation or the result of cls(response) @@ -8453,7 +8453,7 @@ def get_migrate_my_sql_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -8515,7 +8515,7 @@ def get_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8589,7 +8589,7 @@ def create_or_update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8651,7 +8651,7 @@ def delete_swift_virtual_network( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -8722,7 +8722,7 @@ def update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8788,7 +8788,7 @@ def list_network_features( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -8857,7 +8857,7 @@ def get_network_trace_operation( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8938,7 +8938,7 @@ def start_web_site_network_trace( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -8996,7 +8996,7 @@ def _start_web_site_network_trace_operation_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -9037,8 +9037,8 @@ def begin_start_web_site_network_trace_operation( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -9144,7 +9144,7 @@ def stop_web_site_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9208,7 +9208,7 @@ def get_network_traces( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9275,7 +9275,7 @@ def get_network_trace_operation_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -9346,7 +9346,7 @@ def get_network_traces_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9409,7 +9409,7 @@ def generate_new_site_publishing_password( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9491,7 +9491,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9553,7 +9553,7 @@ def get_site_php_error_log_flag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -9615,7 +9615,7 @@ def list_premier_add_ons( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9681,7 +9681,7 @@ def get_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9755,7 +9755,7 @@ def add_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9821,7 +9821,7 @@ def delete_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9892,7 +9892,7 @@ def update_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9955,7 +9955,7 @@ def get_private_access( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -10026,7 +10026,7 @@ def put_private_access_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -10105,7 +10105,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10172,7 +10172,7 @@ def get_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10241,7 +10241,7 @@ def delete_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10305,7 +10305,7 @@ def get_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10390,7 +10390,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10461,7 +10461,7 @@ def get_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10546,7 +10546,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10624,7 +10624,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10690,7 +10690,7 @@ def get_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10765,7 +10765,7 @@ def create_or_update_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10831,7 +10831,7 @@ def delete_public_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10899,7 +10899,7 @@ def list_publishing_profile_xml_with_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -10962,7 +10962,7 @@ def reset_production_slot_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11033,7 +11033,7 @@ def restart( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11085,7 +11085,7 @@ def _restore_from_backup_blob_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11113,8 +11113,8 @@ def begin_restore_from_backup_blob( :type request: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11208,7 +11208,7 @@ def _restore_from_deleted_app_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11236,8 +11236,8 @@ def begin_restore_from_deleted_app( :type restore_request: ~azure.mgmt.web.v2019_08_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11331,7 +11331,7 @@ def _restore_snapshot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11360,8 +11360,8 @@ def begin_restore_snapshot( :type restore_request: ~azure.mgmt.web.v2019_08_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11478,7 +11478,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11544,7 +11544,7 @@ def get_site_extension( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11597,7 +11597,7 @@ def _install_site_extension_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11633,8 +11633,8 @@ def begin_install_site_extension( :type site_extension_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -11743,7 +11743,7 @@ def delete_site_extension( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11795,7 +11795,7 @@ def _copy_production_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11824,8 +11824,8 @@ def begin_copy_production_slot( :type copy_slot_entity: ~azure.mgmt.web.v2019_08_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11942,7 +11942,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12008,7 +12008,7 @@ def get_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -12067,7 +12067,7 @@ def _create_or_update_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -12108,8 +12108,8 @@ def begin_create_or_update_slot( :type site_envelope: ~azure.mgmt.web.v2019_08_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Site or the result of cls(response) @@ -12232,7 +12232,7 @@ def delete_slot( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12306,7 +12306,7 @@ def update_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -12381,7 +12381,7 @@ def analyze_custom_hostname_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -12456,7 +12456,7 @@ def apply_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12529,7 +12529,7 @@ def backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12612,7 +12612,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12683,7 +12683,7 @@ def get_backup_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12754,7 +12754,7 @@ def delete_backup_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12831,7 +12831,7 @@ def list_backup_status_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12890,7 +12890,7 @@ def _restore_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12925,8 +12925,8 @@ def begin_restore_slot( :type request: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -13052,7 +13052,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -13127,7 +13127,7 @@ def update_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13194,7 +13194,7 @@ def list_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13268,7 +13268,7 @@ def update_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13335,7 +13335,7 @@ def get_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13410,7 +13410,7 @@ def update_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13477,7 +13477,7 @@ def list_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13552,7 +13552,7 @@ def update_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13619,7 +13619,7 @@ def delete_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -13683,7 +13683,7 @@ def get_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13758,7 +13758,7 @@ def update_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13825,7 +13825,7 @@ def list_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13892,7 +13892,7 @@ def get_diagnostic_logs_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13968,7 +13968,7 @@ def update_diagnostic_logs_config_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -14043,7 +14043,7 @@ def update_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -14110,7 +14110,7 @@ def list_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -14161,7 +14161,7 @@ def _list_publishing_credentials_slot_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -14193,8 +14193,8 @@ def begin_list_publishing_credentials_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either User or the result of cls(response) @@ -14311,7 +14311,7 @@ def update_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14377,7 +14377,7 @@ def list_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14445,7 +14445,7 @@ def get_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14520,7 +14520,7 @@ def create_or_update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14595,7 +14595,7 @@ def update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14679,7 +14679,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14750,7 +14750,7 @@ def get_configuration_snapshot_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14821,7 +14821,7 @@ def recover_site_configuration_snapshot_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15035,7 +15035,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15106,7 +15106,7 @@ def get_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -15179,7 +15179,7 @@ def delete_continuous_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15247,7 +15247,7 @@ def start_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15315,7 +15315,7 @@ def stop_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15395,7 +15395,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15466,7 +15466,7 @@ def get_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15545,7 +15545,7 @@ def create_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15616,7 +15616,7 @@ def delete_deployment_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15685,7 +15685,7 @@ def list_deployment_log_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15762,7 +15762,7 @@ def discover_backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -15845,7 +15845,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15916,7 +15916,7 @@ def get_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15996,7 +15996,7 @@ def create_or_update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -16067,7 +16067,7 @@ def delete_domain_ownership_identifier_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16144,7 +16144,7 @@ def update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -16210,7 +16210,7 @@ def get_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -16267,7 +16267,7 @@ def _create_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16303,8 +16303,8 @@ def begin_create_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2019_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -16414,7 +16414,7 @@ def get_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16498,7 +16498,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16564,7 +16564,7 @@ def get_functions_admin_token_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -16634,7 +16634,7 @@ def get_instance_function_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16695,7 +16695,7 @@ def _create_instance_function_slot_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -16732,8 +16732,8 @@ def begin_create_instance_function_slot( :type function_envelope: ~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -16849,7 +16849,7 @@ def delete_instance_function_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16928,7 +16928,7 @@ def create_or_update_function_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -17006,7 +17006,7 @@ def delete_function_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17073,7 +17073,7 @@ def list_function_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -17143,7 +17143,7 @@ def list_function_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -17209,7 +17209,7 @@ def list_host_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -17275,7 +17275,7 @@ def list_sync_status_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17338,7 +17338,7 @@ def sync_functions_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17417,7 +17417,7 @@ def create_or_update_host_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -17495,7 +17495,7 @@ def delete_host_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17575,7 +17575,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17646,7 +17646,7 @@ def get_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17726,7 +17726,7 @@ def create_or_update_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17797,7 +17797,7 @@ def delete_host_name_binding_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17868,7 +17868,7 @@ def get_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17950,7 +17950,7 @@ def create_or_update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18024,7 +18024,7 @@ def delete_hybrid_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18103,7 +18103,7 @@ def update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18169,7 +18169,7 @@ def list_hybrid_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18237,7 +18237,7 @@ def list_relay_service_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18308,7 +18308,7 @@ def get_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18388,7 +18388,7 @@ def create_or_update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18459,7 +18459,7 @@ def delete_relay_service_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18536,7 +18536,7 @@ def update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18619,7 +18619,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -18690,7 +18690,7 @@ def get_instance_info_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -18760,7 +18760,7 @@ def get_instance_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -18819,7 +18819,7 @@ def _create_instance_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -18858,8 +18858,8 @@ def begin_create_instance_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2019_08_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -18975,7 +18975,7 @@ def get_instance_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19066,7 +19066,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19143,7 +19143,7 @@ def get_instance_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19222,7 +19222,7 @@ def delete_instance_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -19296,7 +19296,7 @@ def get_instance_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19391,7 +19391,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19472,7 +19472,7 @@ def get_instance_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19567,7 +19567,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19634,7 +19634,7 @@ def is_cloneable_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -19717,7 +19717,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19783,7 +19783,7 @@ def list_sync_function_triggers_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -19850,7 +19850,7 @@ def get_migrate_my_sql_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -19917,7 +19917,7 @@ def get_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19996,7 +19996,7 @@ def create_or_update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -20063,7 +20063,7 @@ def delete_swift_virtual_network_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20139,7 +20139,7 @@ def update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -20210,7 +20210,7 @@ def list_network_features_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -20284,7 +20284,7 @@ def get_network_trace_operation_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20369,7 +20369,7 @@ def start_web_site_network_trace_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -20429,7 +20429,7 @@ def _start_web_site_network_trace_operation_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20473,8 +20473,8 @@ def begin_start_web_site_network_trace_operation_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -20586,7 +20586,7 @@ def stop_web_site_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20655,7 +20655,7 @@ def get_network_traces_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20727,7 +20727,7 @@ def get_network_trace_operation_slot_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20803,7 +20803,7 @@ def get_network_traces_slot_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20871,7 +20871,7 @@ def generate_new_site_publishing_password_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20957,7 +20957,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21023,7 +21023,7 @@ def get_site_php_error_log_flag_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -21090,7 +21090,7 @@ def list_premier_add_ons_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21161,7 +21161,7 @@ def get_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21240,7 +21240,7 @@ def add_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21311,7 +21311,7 @@ def delete_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -21387,7 +21387,7 @@ def update_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21454,7 +21454,7 @@ def get_private_access_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21529,7 +21529,7 @@ def put_private_access_vnet_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21595,7 +21595,7 @@ def get_private_endpoint_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) @@ -21652,7 +21652,7 @@ def _approve_or_reject_private_endpoint_connection_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21690,8 +21690,8 @@ def begin_approve_or_reject_private_endpoint_connection( :type private_endpoint_wrapper: ~azure.mgmt.web.v2019_08_01.models.PrivateLinkConnectionApprovalRequestResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnectionResource or the result of cls(response) @@ -21786,7 +21786,7 @@ def _delete_private_endpoint_connection_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21824,8 +21824,8 @@ def begin_delete_private_endpoint_connection( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either object or the result of cls(response) @@ -21930,7 +21930,7 @@ def get_private_link_resources( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) @@ -22014,7 +22014,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22086,7 +22086,7 @@ def get_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22160,7 +22160,7 @@ def delete_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22229,7 +22229,7 @@ def get_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22319,7 +22319,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22395,7 +22395,7 @@ def get_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22485,7 +22485,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22568,7 +22568,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22639,7 +22639,7 @@ def get_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22719,7 +22719,7 @@ def create_or_update_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22790,7 +22790,7 @@ def delete_public_certificate_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22863,7 +22863,7 @@ def list_publishing_profile_xml_with_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -22931,7 +22931,7 @@ def reset_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23007,7 +23007,7 @@ def restart_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23061,7 +23061,7 @@ def _restore_from_backup_blob_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23093,8 +23093,8 @@ def begin_restore_from_backup_blob_slot( :type request: ~azure.mgmt.web.v2019_08_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23192,7 +23192,7 @@ def _restore_from_deleted_app_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23223,8 +23223,8 @@ def begin_restore_from_deleted_app_slot( :type restore_request: ~azure.mgmt.web.v2019_08_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23322,7 +23322,7 @@ def _restore_snapshot_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23354,8 +23354,8 @@ def begin_restore_snapshot_slot( :type restore_request: ~azure.mgmt.web.v2019_08_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23479,7 +23479,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23550,7 +23550,7 @@ def get_site_extension_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23605,7 +23605,7 @@ def _install_site_extension_slot_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23645,8 +23645,8 @@ def begin_install_site_extension_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -23762,7 +23762,7 @@ def delete_site_extension_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23816,7 +23816,7 @@ def _copy_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23849,8 +23849,8 @@ def begin_copy_slot( :type copy_slot_entity: ~azure.mgmt.web.v2019_08_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23985,7 +23985,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24042,7 +24042,7 @@ def _swap_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24074,8 +24074,8 @@ def begin_swap_slot( :type slot_swap_entity: ~azure.mgmt.web.v2019_08_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -24198,7 +24198,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24280,7 +24280,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24347,7 +24347,7 @@ def get_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24411,7 +24411,7 @@ def _create_or_update_source_control_slot_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24453,8 +24453,8 @@ def begin_create_or_update_source_control_slot( :type site_source_control: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) @@ -24565,7 +24565,7 @@ def delete_source_control_slot( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24637,7 +24637,7 @@ def update_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24711,7 +24711,7 @@ def start_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24768,7 +24768,7 @@ def _start_network_trace_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24812,8 +24812,8 @@ def begin_start_network_trace_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -24926,7 +24926,7 @@ def stop_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24989,7 +24989,7 @@ def stop_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25052,7 +25052,7 @@ def sync_repository_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25115,7 +25115,7 @@ def sync_function_triggers_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25195,7 +25195,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25266,7 +25266,7 @@ def get_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25339,7 +25339,7 @@ def delete_triggered_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25423,7 +25423,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25499,7 +25499,7 @@ def get_triggered_web_job_history_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25572,7 +25572,7 @@ def run_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25660,7 +25660,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25727,7 +25727,7 @@ def list_vnet_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -25798,7 +25798,7 @@ def get_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25878,7 +25878,7 @@ def create_or_update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25950,7 +25950,7 @@ def delete_vnet_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26027,7 +26027,7 @@ def update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -26102,7 +26102,7 @@ def get_vnet_connection_gateway_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -26187,7 +26187,7 @@ def create_or_update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -26270,7 +26270,7 @@ def update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -26353,7 +26353,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26424,7 +26424,7 @@ def get_web_job_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) @@ -26513,7 +26513,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26568,7 +26568,7 @@ def _swap_slot_with_production_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26596,8 +26596,8 @@ def begin_swap_slot_with_production( :type slot_swap_entity: ~azure.mgmt.web.v2019_08_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -26714,7 +26714,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26792,7 +26792,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26854,7 +26854,7 @@ def get_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26916,7 +26916,7 @@ def _create_or_update_source_control_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26954,8 +26954,8 @@ def begin_create_or_update_source_control( :type site_source_control: ~azure.mgmt.web.v2019_08_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) @@ -27059,7 +27059,7 @@ def delete_source_control( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27126,7 +27126,7 @@ def update_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27195,7 +27195,7 @@ def start( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27250,7 +27250,7 @@ def _start_network_trace_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27291,8 +27291,8 @@ def begin_start_network_trace( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -27398,7 +27398,7 @@ def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27457,7 +27457,7 @@ def stop_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27516,7 +27516,7 @@ def sync_repository( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27575,7 +27575,7 @@ def sync_function_triggers( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27650,7 +27650,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27716,7 +27716,7 @@ def get_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -27784,7 +27784,7 @@ def delete_triggered_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27863,7 +27863,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27934,7 +27934,7 @@ def get_triggered_web_job_history( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -28002,7 +28002,7 @@ def run_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28085,7 +28085,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28147,7 +28147,7 @@ def list_vnet_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -28213,7 +28213,7 @@ def get_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28288,7 +28288,7 @@ def create_or_update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28355,7 +28355,7 @@ def delete_vnet_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28427,7 +28427,7 @@ def update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28497,7 +28497,7 @@ def get_vnet_connection_gateway( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -28577,7 +28577,7 @@ def create_or_update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28655,7 +28655,7 @@ def update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28733,7 +28733,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28799,7 +28799,7 @@ def get_web_job( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_site_management_client_operations.py index ed20e2722423..a5b740f7dc24 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_site_management_client_operations.py @@ -64,7 +64,7 @@ def get_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -122,7 +122,7 @@ def update_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -188,7 +188,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -245,7 +245,7 @@ def get_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -310,7 +310,7 @@ def update_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -390,7 +390,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -460,7 +460,7 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceNameAvailability', pipeline_response) @@ -514,7 +514,7 @@ def get_subscription_deployment_locations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeploymentLocations', pipeline_response) @@ -607,7 +607,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -688,7 +688,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -758,7 +758,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -812,7 +812,7 @@ def list_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SkuInfos', pipeline_response) @@ -875,7 +875,7 @@ def verify_hosting_environment_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetValidationFailureDetails', pipeline_response) @@ -941,7 +941,7 @@ def move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1004,7 +1004,7 @@ def validate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateResponse', pipeline_response) @@ -1070,7 +1070,7 @@ def validate_move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/__init__.py index 32779ae9e1b0..45c59c58316a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['WebSiteManagementClient'] try: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_configuration.py index 7d9ffea3ff94..3035748ead63 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_metadata.json index 6ff75acaaea6..71609ac3a1d5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "app_service_certificate_orders": "AppServiceCertificateOrdersOperations", @@ -69,199 +115,201 @@ "resource_health_metadata": "ResourceHealthMetadataOperations" }, "operation_mixins": { - "get_publishing_user" : { - "sync": { - "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "update_publishing_user" : { - "sync": { - "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_06_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_06_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "user_details" - }, - "list_source_controls" : { - "sync": { - "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "get_source_control" : { - "sync": { - "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "source_control_type" - }, - "update_source_control" : { - "sync": { - "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "source_control_type, request_message" - }, - "list_billing_meters" : { - "sync": { - "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "billing_location, os_type" - }, - "check_name_availability" : { - "sync": { - "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "name, type, is_fqdn" - }, - "get_subscription_deployment_locations" : { - "sync": { - "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "list_geo_regions" : { - "sync": { - "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" - }, - "list_site_identifiers_assigned_to_host_name" : { - "sync": { - "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "name_identifier" - }, - "list_premier_add_on_offers" : { - "sync": { - "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "list_skus" : { - "sync": { - "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "verify_hosting_environment_vnet" : { - "sync": { - "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_06_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_06_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "parameters" - }, - "move" : { - "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, move_resource_envelope" - }, - "validate" : { - "sync": { - "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_06_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_06_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, validate_request" - }, - "validate_move" : { - "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, move_resource_envelope" + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "operations": { + "get_publishing_user" : { + "sync": { + "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "update_publishing_user" : { + "sync": { + "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_06_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_06_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "user_details" + }, + "list_source_controls" : { + "sync": { + "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "get_source_control" : { + "sync": { + "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type" + }, + "update_source_control" : { + "sync": { + "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type, request_message" + }, + "list_billing_meters" : { + "sync": { + "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.BillingMeterCollection\"]:\n", + "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "billing_location, os_type" + }, + "check_name_availability" : { + "sync": { + "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", + "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name, type, is_fqdn" + }, + "get_subscription_deployment_locations" : { + "sync": { + "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_geo_regions" : { + "sync": { + "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" + }, + "list_site_identifiers_assigned_to_host_name" : { + "sync": { + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name_identifier" + }, + "list_premier_add_on_offers" : { + "sync": { + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", + "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_skus" : { + "sync": { + "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", + "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "verify_hosting_environment_vnet" : { + "sync": { + "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_06_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_06_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "parameters" + }, + "move" : { + "sync": { + "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + }, + "validate" : { + "sync": { + "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_06_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_06_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, validate_request" + }, + "validate_move" : { + "sync": { + "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + } } - }, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}" + } } \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_version.py new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_web_site_management_client.py index 54fa56f31e5e..d4fb858546dc 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_web_site_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import WebSiteManagementClientConfiguration from .operations import AppServiceCertificateOrdersOperations @@ -127,6 +128,24 @@ def __init__( self.resource_health_metadata = ResourceHealthMetadataOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_configuration.py index 59a16dc32a16..5e1391a1d523 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_web_site_management_client.py index bfd495d2cbfd..05260e7fd422 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_web_site_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -124,6 +125,23 @@ def __init__( self.resource_health_metadata = ResourceHealthMetadataOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_certificate_orders_operations.py index 2a81d852adf7..c611f6d41ce5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_certificate_orders_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -162,7 +162,7 @@ async def validate_purchase_information( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -293,7 +293,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) @@ -347,7 +347,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -381,8 +381,8 @@ async def begin_create_or_update( :type certificate_distinguished_name: ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceCertificateOrder or the result of cls(response) @@ -485,7 +485,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -551,7 +551,7 @@ async def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -632,7 +632,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -697,7 +697,7 @@ async def get_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) @@ -753,7 +753,7 @@ async def _create_or_update_certificate_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -790,8 +790,8 @@ async def begin_create_or_update_certificate( :type key_vault_certificate: ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceCertificateResource or the result of cls(response) @@ -900,7 +900,7 @@ async def delete_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -970,7 +970,7 @@ async def update_certificate( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1043,7 +1043,7 @@ async def reissue( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1109,7 +1109,7 @@ async def renew( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1167,7 +1167,7 @@ async def resend_email( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1233,7 +1233,7 @@ async def resend_request_emails( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1299,7 +1299,7 @@ async def retrieve_site_seal( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteSeal', pipeline_response) @@ -1360,7 +1360,7 @@ async def verify_domain_ownership( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1418,7 +1418,7 @@ async def retrieve_certificate_actions( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateOrderAction]', pipeline_response) @@ -1479,7 +1479,7 @@ async def retrieve_certificate_email_history( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateEmail]', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_environments_operations.py index 2fc42e2c999f..4ca3a7640301 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_environments_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -174,7 +174,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -235,7 +235,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) @@ -289,7 +289,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -326,8 +326,8 @@ async def begin_create_or_update( :type hosting_environment_envelope: ~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) @@ -420,7 +420,7 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -448,8 +448,8 @@ async def begin_delete( :type force_delete: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -557,7 +557,7 @@ async def update( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -641,7 +641,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -702,7 +702,7 @@ async def get_vip_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressResponse', pipeline_response) @@ -756,7 +756,7 @@ async def _change_vnet_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -790,8 +790,8 @@ async def begin_change_vnet( :type vnet_info: ~azure.mgmt.web.v2020_06_01.models.VirtualNetworkProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -853,7 +853,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -957,7 +957,7 @@ async def list_diagnostics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', pipeline_response) @@ -1022,7 +1022,7 @@ async def get_diagnostics_item( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostingEnvironmentDiagnostics', pipeline_response) @@ -1100,7 +1100,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1177,7 +1177,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1238,7 +1238,7 @@ async def get_multi_role_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -1292,7 +1292,7 @@ async def _create_or_update_multi_role_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1326,8 +1326,8 @@ async def begin_create_or_update_multi_role_pool( :type multi_role_pool_envelope: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -1438,7 +1438,7 @@ async def update_multi_role_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1524,7 +1524,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1601,7 +1601,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1678,7 +1678,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1755,7 +1755,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1816,7 +1816,7 @@ async def list_operations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Operation]', pipeline_response) @@ -1894,7 +1894,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1955,7 +1955,7 @@ async def reboot( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2000,7 +2000,7 @@ async def _resume_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2031,8 +2031,8 @@ async def begin_resume( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2086,7 +2086,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2205,7 +2205,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2287,7 +2287,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2335,7 +2335,7 @@ async def _suspend_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2366,8 +2366,8 @@ async def begin_suspend( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2421,7 +2421,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2548,7 +2548,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2625,7 +2625,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2690,7 +2690,7 @@ async def get_worker_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -2746,7 +2746,7 @@ async def _create_or_update_worker_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2783,8 +2783,8 @@ async def begin_create_or_update_worker_pool( :type worker_pool_envelope: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -2901,7 +2901,7 @@ async def update_worker_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2991,7 +2991,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3072,7 +3072,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3153,7 +3153,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3234,7 +3234,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_plans_operations.py index 839b52cb3628..930a640c9971 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_plans_operations.py @@ -108,7 +108,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -181,7 +181,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -242,7 +242,7 @@ async def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -298,7 +298,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -332,8 +332,8 @@ async def begin_create_or_update( :type app_service_plan: ~azure.mgmt.web.v2020_06_01.models.AppServicePlan :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServicePlan or the result of cls(response) @@ -436,7 +436,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -502,7 +502,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -567,7 +567,7 @@ async def list_capabilities( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Capability]', pipeline_response) @@ -636,7 +636,7 @@ async def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -705,7 +705,7 @@ async def delete_hybrid_connection( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -771,7 +771,7 @@ async def list_hybrid_connection_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -856,7 +856,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -917,7 +917,7 @@ async def get_hybrid_connection_plan_limit( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionLimits', pipeline_response) @@ -994,7 +994,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1062,7 +1062,7 @@ async def restart_web_apps( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1154,7 +1154,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1215,7 +1215,7 @@ async def get_server_farm_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -1298,7 +1298,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1359,7 +1359,7 @@ async def list_vnets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -1424,7 +1424,7 @@ async def get_vnet_from_server_farm( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1495,7 +1495,7 @@ async def get_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1572,7 +1572,7 @@ async def update_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1638,7 +1638,7 @@ async def list_routes_for_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetRoute]', pipeline_response) @@ -1707,7 +1707,7 @@ async def get_route_for_vnet( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1786,7 +1786,7 @@ async def create_or_update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1857,7 +1857,7 @@ async def delete_vnet_route( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1931,7 +1931,7 @@ async def update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1998,7 +1998,7 @@ async def reboot_worker( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificate_registration_provider_operations.py index 9c37dd92c6b1..e9e177c0bf59 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificate_registration_provider_operations.py @@ -96,7 +96,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificates_operations.py index e0fbf6dbd315..bede65d9c003 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificates_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -233,7 +233,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -302,7 +302,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -363,7 +363,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -429,7 +429,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_deleted_web_apps_operations.py index ea7bc96b055c..db35a53c32c8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_deleted_web_apps_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -233,7 +233,7 @@ async def get_deleted_web_app_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeletedSite', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_diagnostics_operations.py index f9da6107d42c..c81d9336cc77 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_diagnostics_operations.py @@ -108,7 +108,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -188,7 +188,7 @@ async def get_hosting_environment_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -265,7 +265,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -345,7 +345,7 @@ async def get_site_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -422,7 +422,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -487,7 +487,7 @@ async def get_site_diagnostic_category( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -568,7 +568,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -637,7 +637,7 @@ async def get_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -721,7 +721,7 @@ async def execute_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -802,7 +802,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -871,7 +871,7 @@ async def get_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -955,7 +955,7 @@ async def execute_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) @@ -1036,7 +1036,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1120,7 +1120,7 @@ async def get_site_detector_response_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -1201,7 +1201,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1270,7 +1270,7 @@ async def get_site_diagnostic_category_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -1355,7 +1355,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1428,7 +1428,7 @@ async def get_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -1516,7 +1516,7 @@ async def execute_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -1601,7 +1601,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1674,7 +1674,7 @@ async def get_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -1762,7 +1762,7 @@ async def execute_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domain_registration_provider_operations.py index bb3043ec7a35..c39fd6dc085b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domain_registration_provider_operations.py @@ -96,7 +96,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domains_operations.py index adac89038081..d3b8c03a16f6 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domains_operations.py @@ -93,7 +93,7 @@ async def check_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainAvailabilityCheckResult', pipeline_response) @@ -162,7 +162,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -215,7 +215,7 @@ async def get_control_center_sso_request( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainControlCenterSsoRequest', pipeline_response) @@ -295,7 +295,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -368,7 +368,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -429,7 +429,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Domain', pipeline_response) @@ -483,7 +483,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -517,8 +517,8 @@ async def begin_create_or_update( :type domain: ~azure.mgmt.web.v2020_06_01.models.Domain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Domain or the result of cls(response) @@ -627,7 +627,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -693,7 +693,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -774,7 +774,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -839,7 +839,7 @@ async def get_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -858,10 +858,10 @@ async def create_or_update_ownership_identifier( domain_ownership_identifier: "_models.DomainOwnershipIdentifier", **kwargs ) -> "_models.DomainOwnershipIdentifier": - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -913,7 +913,7 @@ async def create_or_update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -978,7 +978,7 @@ async def delete_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -994,10 +994,10 @@ async def update_ownership_identifier( domain_ownership_identifier: "_models.DomainOwnershipIdentifier", **kwargs ) -> "_models.DomainOwnershipIdentifier": - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1049,7 +1049,7 @@ async def update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -1110,7 +1110,7 @@ async def renew( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_provider_operations.py index 77e77cd8e645..209ad925ebca 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_provider_operations.py @@ -100,7 +100,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -166,7 +166,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_recommendations_operations.py index 28d69824079b..cacc6f490d4e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_recommendations_operations.py @@ -112,7 +112,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -165,7 +165,7 @@ async def reset_all_filters( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -220,7 +220,7 @@ async def disable_recommendation_for_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -307,7 +307,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -396,7 +396,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -461,7 +461,7 @@ async def disable_all_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -523,7 +523,7 @@ async def reset_all_filters_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -597,7 +597,7 @@ async def get_rule_details_by_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -666,7 +666,7 @@ async def disable_recommendation_for_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -753,7 +753,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -842,7 +842,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -903,7 +903,7 @@ async def disable_all_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -961,7 +961,7 @@ async def reset_all_filters_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1035,7 +1035,7 @@ async def get_rule_details_by_web_app( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -1100,7 +1100,7 @@ async def disable_recommendation_for_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_resource_health_metadata_operations.py index d932503b923f..48d97b63c2d9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_resource_health_metadata_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -173,7 +173,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -251,7 +251,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -312,7 +312,7 @@ async def get_by_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) @@ -394,7 +394,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -459,7 +459,7 @@ async def get_by_site_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_static_sites_operations.py index 3ced26168c40..507bfc76adde 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_static_sites_operations.py @@ -96,7 +96,7 @@ async def preview_workflow( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSitesWorkflowPreview', pipeline_response) @@ -165,7 +165,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -238,7 +238,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -299,7 +299,7 @@ async def get_static_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) @@ -369,7 +369,7 @@ async def create_or_update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -434,7 +434,7 @@ async def delete_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -501,7 +501,7 @@ async def update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -586,7 +586,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -655,7 +655,7 @@ async def delete_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -730,7 +730,7 @@ async def update_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserARMResource', pipeline_response) @@ -807,7 +807,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -872,7 +872,7 @@ async def get_static_site_build( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteBuildARMResource', pipeline_response) @@ -937,7 +937,7 @@ async def delete_static_site_build( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1007,7 +1007,7 @@ async def create_or_update_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1092,7 +1092,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1157,7 +1157,7 @@ async def list_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1230,7 +1230,7 @@ async def create_or_update_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1303,7 +1303,7 @@ async def create_user_roles_invitation_link( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', pipeline_response) @@ -1380,7 +1380,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1446,7 +1446,7 @@ async def create_or_update_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1515,7 +1515,7 @@ async def delete_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1577,7 +1577,7 @@ async def validate_custom_domain_can_be_added_to_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1635,7 +1635,7 @@ async def detach_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1709,7 +1709,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1770,7 +1770,7 @@ async def list_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1835,7 +1835,7 @@ async def list_static_site_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1904,7 +1904,7 @@ async def reset_static_site_api_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_top_level_domains_operations.py index 260d00029530..a6fb59429452 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_top_level_domains_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -156,7 +156,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TopLevelDomain', pipeline_response) @@ -240,7 +240,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_apps_operations.py index 4adb40f2092d..656e8f2d3063 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_apps_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -180,7 +180,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -241,7 +241,7 @@ async def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -297,7 +297,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -333,8 +333,8 @@ async def begin_create_or_update( :type site_envelope: ~azure.mgmt.web.v2020_06_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) @@ -448,7 +448,7 @@ async def delete( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -516,7 +516,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -586,7 +586,7 @@ async def analyze_custom_hostname( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -655,7 +655,7 @@ async def apply_slot_config_to_production( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -722,7 +722,7 @@ async def backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -799,7 +799,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -864,7 +864,7 @@ async def get_backup_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -929,7 +929,7 @@ async def delete_backup( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1001,7 +1001,7 @@ async def list_backup_status_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -1057,7 +1057,7 @@ async def _restore_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1087,8 +1087,8 @@ async def begin_restore( :type request: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -1191,7 +1191,7 @@ async def get_basic_publishing_credentials_policies( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', pipeline_response) @@ -1252,7 +1252,7 @@ async def get_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1321,7 +1321,7 @@ async def update_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1382,7 +1382,7 @@ async def get_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1451,7 +1451,7 @@ async def update_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1528,7 +1528,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1597,7 +1597,7 @@ async def update_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1658,7 +1658,7 @@ async def list_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1727,7 +1727,7 @@ async def update_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1788,7 +1788,7 @@ async def get_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1858,7 +1858,7 @@ async def update_auth_settings_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -1919,7 +1919,7 @@ async def get_auth_settings_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -1988,7 +1988,7 @@ async def update_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -2049,7 +2049,7 @@ async def list_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -2118,7 +2118,7 @@ async def update_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2179,7 +2179,7 @@ async def delete_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2237,7 +2237,7 @@ async def get_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2306,7 +2306,7 @@ async def update_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2367,7 +2367,7 @@ async def list_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2428,7 +2428,7 @@ async def get_diagnostic_logs_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2498,7 +2498,7 @@ async def update_diagnostic_logs_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2567,7 +2567,7 @@ async def update_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2628,7 +2628,7 @@ async def list_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2676,7 +2676,7 @@ async def _list_publishing_credentials_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -2703,8 +2703,8 @@ async def begin_list_publishing_credentials( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) @@ -2814,7 +2814,7 @@ async def update_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2875,7 +2875,7 @@ async def list_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2937,7 +2937,7 @@ async def list_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3007,7 +3007,7 @@ async def update_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3069,7 +3069,7 @@ async def get_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3138,7 +3138,7 @@ async def create_or_update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3207,7 +3207,7 @@ async def update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3285,7 +3285,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3350,7 +3350,7 @@ async def get_configuration_snapshot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3415,7 +3415,7 @@ async def recover_site_configuration_snapshot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3613,7 +3613,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3678,7 +3678,7 @@ async def get_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -3745,7 +3745,7 @@ async def delete_continuous_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3807,7 +3807,7 @@ async def start_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3869,7 +3869,7 @@ async def stop_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3943,7 +3943,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4008,7 +4008,7 @@ async def get_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4081,7 +4081,7 @@ async def create_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4146,7 +4146,7 @@ async def delete_deployment( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4209,7 +4209,7 @@ async def list_deployment_log( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4280,7 +4280,7 @@ async def discover_backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -4357,7 +4357,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4422,7 +4422,7 @@ async def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4496,7 +4496,7 @@ async def create_or_update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4561,7 +4561,7 @@ async def delete_domain_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4632,7 +4632,7 @@ async def update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4693,7 +4693,7 @@ async def get_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -4747,7 +4747,7 @@ async def _create_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -4779,8 +4779,8 @@ async def begin_create_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2020_06_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -4883,7 +4883,7 @@ async def get_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -4962,7 +4962,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5023,7 +5023,7 @@ async def get_functions_admin_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -5088,7 +5088,7 @@ async def get_function( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -5146,7 +5146,7 @@ async def _create_function_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -5179,8 +5179,8 @@ async def begin_create_function( :type function_envelope: ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -5289,7 +5289,7 @@ async def delete_function( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5363,7 +5363,7 @@ async def create_or_update_function_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5436,7 +5436,7 @@ async def delete_function_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5498,7 +5498,7 @@ async def list_function_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -5563,7 +5563,7 @@ async def list_function_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -5624,7 +5624,7 @@ async def list_host_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -5685,7 +5685,7 @@ async def list_sync_status( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5743,7 +5743,7 @@ async def sync_functions( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5817,7 +5817,7 @@ async def create_or_update_host_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5890,7 +5890,7 @@ async def delete_host_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5964,7 +5964,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6029,7 +6029,7 @@ async def get_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6103,7 +6103,7 @@ async def create_or_update_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6168,7 +6168,7 @@ async def delete_host_name_binding( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6234,7 +6234,7 @@ async def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6311,7 +6311,7 @@ async def create_or_update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6380,7 +6380,7 @@ async def delete_hybrid_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6454,7 +6454,7 @@ async def update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6515,7 +6515,7 @@ async def list_hybrid_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6577,7 +6577,7 @@ async def list_relay_service_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6642,7 +6642,7 @@ async def get_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6716,7 +6716,7 @@ async def create_or_update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6781,7 +6781,7 @@ async def delete_relay_service_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6852,7 +6852,7 @@ async def update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6929,7 +6929,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6994,7 +6994,7 @@ async def get_instance_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -7059,7 +7059,7 @@ async def get_instance_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -7115,7 +7115,7 @@ async def _create_instance_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7150,8 +7150,8 @@ async def begin_create_instance_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2020_06_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -7260,7 +7260,7 @@ async def get_instance_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7345,7 +7345,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7416,7 +7416,7 @@ async def get_instance_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7489,7 +7489,7 @@ async def delete_instance_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -7557,7 +7557,7 @@ async def get_instance_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7646,7 +7646,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7721,7 +7721,7 @@ async def get_instance_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7810,7 +7810,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7871,7 +7871,7 @@ async def is_cloneable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -7948,7 +7948,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8009,7 +8009,7 @@ async def list_sync_function_triggers( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -8065,7 +8065,7 @@ async def _migrate_storage_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) @@ -8098,8 +8098,8 @@ async def begin_migrate_storage( :type migration_options: ~azure.mgmt.web.v2020_06_01.models.StorageMigrationOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either StorageMigrationResponse or the result of cls(response) @@ -8196,7 +8196,7 @@ async def _migrate_my_sql_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Operation', pipeline_response) @@ -8226,8 +8226,8 @@ async def begin_migrate_my_sql( :type migration_request_envelope: ~azure.mgmt.web.v2020_06_01.models.MigrateMySqlRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Operation or the result of cls(response) @@ -8331,7 +8331,7 @@ async def get_migrate_my_sql_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -8392,7 +8392,7 @@ async def get_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8465,7 +8465,7 @@ async def create_or_update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8526,7 +8526,7 @@ async def delete_swift_virtual_network( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -8596,7 +8596,7 @@ async def update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8661,7 +8661,7 @@ async def list_network_features( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -8729,7 +8729,7 @@ async def get_network_trace_operation( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8809,7 +8809,7 @@ async def start_web_site_network_trace( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -8866,7 +8866,7 @@ async def _start_web_site_network_trace_operation_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8906,8 +8906,8 @@ async def begin_start_web_site_network_trace_operation( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -9012,7 +9012,7 @@ async def stop_web_site_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9075,7 +9075,7 @@ async def get_network_traces( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9141,7 +9141,7 @@ async def get_network_trace_operation_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -9211,7 +9211,7 @@ async def get_network_traces_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9273,7 +9273,7 @@ async def generate_new_site_publishing_password( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9354,7 +9354,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9415,7 +9415,7 @@ async def get_site_php_error_log_flag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -9476,7 +9476,7 @@ async def list_premier_add_ons( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9541,7 +9541,7 @@ async def get_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9614,7 +9614,7 @@ async def add_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9679,7 +9679,7 @@ async def delete_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9749,7 +9749,7 @@ async def update_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9811,7 +9811,7 @@ async def get_private_access( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -9881,7 +9881,7 @@ async def put_private_access_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -9959,7 +9959,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10025,7 +10025,7 @@ async def get_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10093,7 +10093,7 @@ async def delete_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10156,7 +10156,7 @@ async def get_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10240,7 +10240,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10310,7 +10310,7 @@ async def get_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10394,7 +10394,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10471,7 +10471,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10536,7 +10536,7 @@ async def get_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10610,7 +10610,7 @@ async def create_or_update_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10675,7 +10675,7 @@ async def delete_public_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10742,7 +10742,7 @@ async def list_publishing_profile_xml_with_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -10804,7 +10804,7 @@ async def reset_production_slot_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10874,7 +10874,7 @@ async def restart( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10925,7 +10925,7 @@ async def _restore_from_backup_blob_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10952,8 +10952,8 @@ async def begin_restore_from_backup_blob( :type request: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11046,7 +11046,7 @@ async def _restore_from_deleted_app_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11073,8 +11073,8 @@ async def begin_restore_from_deleted_app( :type restore_request: ~azure.mgmt.web.v2020_06_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11167,7 +11167,7 @@ async def _restore_snapshot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11195,8 +11195,8 @@ async def begin_restore_snapshot( :type restore_request: ~azure.mgmt.web.v2020_06_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11312,7 +11312,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11377,7 +11377,7 @@ async def get_site_extension( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11429,7 +11429,7 @@ async def _install_site_extension_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11464,8 +11464,8 @@ async def begin_install_site_extension( :type site_extension_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -11573,7 +11573,7 @@ async def delete_site_extension( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11624,7 +11624,7 @@ async def _copy_production_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11652,8 +11652,8 @@ async def begin_copy_production_slot( :type copy_slot_entity: ~azure.mgmt.web.v2020_06_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11769,7 +11769,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11834,7 +11834,7 @@ async def get_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11892,7 +11892,7 @@ async def _create_or_update_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -11932,8 +11932,8 @@ async def begin_create_or_update_slot( :type site_envelope: ~azure.mgmt.web.v2020_06_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) @@ -12055,7 +12055,7 @@ async def delete_slot( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12128,7 +12128,7 @@ async def update_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -12202,7 +12202,7 @@ async def analyze_custom_hostname_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -12276,7 +12276,7 @@ async def apply_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12348,7 +12348,7 @@ async def backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12430,7 +12430,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12500,7 +12500,7 @@ async def get_backup_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12570,7 +12570,7 @@ async def delete_backup_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12646,7 +12646,7 @@ async def list_backup_status_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12704,7 +12704,7 @@ async def _restore_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12738,8 +12738,8 @@ async def begin_restore_slot( :type request: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -12864,7 +12864,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12938,7 +12938,7 @@ async def update_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13004,7 +13004,7 @@ async def list_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13077,7 +13077,7 @@ async def update_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13143,7 +13143,7 @@ async def get_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13217,7 +13217,7 @@ async def update_auth_settings_v2_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -13283,7 +13283,7 @@ async def get_auth_settings_v2_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -13357,7 +13357,7 @@ async def update_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13423,7 +13423,7 @@ async def list_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13497,7 +13497,7 @@ async def update_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13563,7 +13563,7 @@ async def delete_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -13626,7 +13626,7 @@ async def get_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13700,7 +13700,7 @@ async def update_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13766,7 +13766,7 @@ async def list_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13832,7 +13832,7 @@ async def get_diagnostic_logs_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13907,7 +13907,7 @@ async def update_diagnostic_logs_config_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13981,7 +13981,7 @@ async def update_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -14047,7 +14047,7 @@ async def list_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -14097,7 +14097,7 @@ async def _list_publishing_credentials_slot_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -14128,8 +14128,8 @@ async def begin_list_publishing_credentials_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) @@ -14245,7 +14245,7 @@ async def update_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14310,7 +14310,7 @@ async def list_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14377,7 +14377,7 @@ async def get_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14451,7 +14451,7 @@ async def create_or_update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14525,7 +14525,7 @@ async def update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14608,7 +14608,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14678,7 +14678,7 @@ async def get_configuration_snapshot_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14748,7 +14748,7 @@ async def recover_site_configuration_snapshot_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -14959,7 +14959,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15029,7 +15029,7 @@ async def get_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -15101,7 +15101,7 @@ async def delete_continuous_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15168,7 +15168,7 @@ async def start_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15235,7 +15235,7 @@ async def stop_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15314,7 +15314,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15384,7 +15384,7 @@ async def get_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15462,7 +15462,7 @@ async def create_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15532,7 +15532,7 @@ async def delete_deployment_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15600,7 +15600,7 @@ async def list_deployment_log_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15676,7 +15676,7 @@ async def discover_backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -15758,7 +15758,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15828,7 +15828,7 @@ async def get_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15907,7 +15907,7 @@ async def create_or_update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15977,7 +15977,7 @@ async def delete_domain_ownership_identifier_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16053,7 +16053,7 @@ async def update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -16118,7 +16118,7 @@ async def get_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -16174,7 +16174,7 @@ async def _create_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16209,8 +16209,8 @@ async def begin_create_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2020_06_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -16319,7 +16319,7 @@ async def get_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16402,7 +16402,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16467,7 +16467,7 @@ async def get_functions_admin_token_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -16536,7 +16536,7 @@ async def get_instance_function_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16596,7 +16596,7 @@ async def _create_instance_function_slot_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -16632,8 +16632,8 @@ async def begin_create_instance_function_slot( :type function_envelope: ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -16748,7 +16748,7 @@ async def delete_instance_function_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16826,7 +16826,7 @@ async def create_or_update_function_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -16903,7 +16903,7 @@ async def delete_function_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16969,7 +16969,7 @@ async def list_function_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -17038,7 +17038,7 @@ async def list_function_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -17103,7 +17103,7 @@ async def list_host_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -17168,7 +17168,7 @@ async def list_sync_status_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17230,7 +17230,7 @@ async def sync_functions_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17308,7 +17308,7 @@ async def create_or_update_host_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -17385,7 +17385,7 @@ async def delete_host_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17464,7 +17464,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17534,7 +17534,7 @@ async def get_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17613,7 +17613,7 @@ async def create_or_update_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17683,7 +17683,7 @@ async def delete_host_name_binding_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17753,7 +17753,7 @@ async def get_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17834,7 +17834,7 @@ async def create_or_update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17907,7 +17907,7 @@ async def delete_hybrid_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17985,7 +17985,7 @@ async def update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18050,7 +18050,7 @@ async def list_hybrid_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18117,7 +18117,7 @@ async def list_relay_service_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18187,7 +18187,7 @@ async def get_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18266,7 +18266,7 @@ async def create_or_update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18336,7 +18336,7 @@ async def delete_relay_service_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18412,7 +18412,7 @@ async def update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18494,7 +18494,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -18564,7 +18564,7 @@ async def get_instance_info_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -18633,7 +18633,7 @@ async def get_instance_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -18691,7 +18691,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -18729,8 +18729,8 @@ async def begin_create_instance_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2020_06_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -18845,7 +18845,7 @@ async def get_instance_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -18935,7 +18935,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19011,7 +19011,7 @@ async def get_instance_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19089,7 +19089,7 @@ async def delete_instance_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -19162,7 +19162,7 @@ async def get_instance_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19256,7 +19256,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19336,7 +19336,7 @@ async def get_instance_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19430,7 +19430,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19496,7 +19496,7 @@ async def is_cloneable_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -19578,7 +19578,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19643,7 +19643,7 @@ async def list_sync_function_triggers_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -19709,7 +19709,7 @@ async def get_migrate_my_sql_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -19775,7 +19775,7 @@ async def get_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19853,7 +19853,7 @@ async def create_or_update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19919,7 +19919,7 @@ async def delete_swift_virtual_network_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -19994,7 +19994,7 @@ async def update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -20064,7 +20064,7 @@ async def list_network_features_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -20137,7 +20137,7 @@ async def get_network_trace_operation_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20221,7 +20221,7 @@ async def start_web_site_network_trace_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -20280,7 +20280,7 @@ async def _start_web_site_network_trace_operation_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20323,8 +20323,8 @@ async def begin_start_web_site_network_trace_operation_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -20435,7 +20435,7 @@ async def stop_web_site_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20503,7 +20503,7 @@ async def get_network_traces_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20574,7 +20574,7 @@ async def get_network_trace_operation_slot_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20649,7 +20649,7 @@ async def get_network_traces_slot_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20716,7 +20716,7 @@ async def generate_new_site_publishing_password_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20801,7 +20801,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -20866,7 +20866,7 @@ async def get_site_php_error_log_flag_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -20932,7 +20932,7 @@ async def list_premier_add_ons_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21002,7 +21002,7 @@ async def get_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21080,7 +21080,7 @@ async def add_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21150,7 +21150,7 @@ async def delete_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -21225,7 +21225,7 @@ async def update_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21291,7 +21291,7 @@ async def get_private_access_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21365,7 +21365,7 @@ async def put_private_access_vnet_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21430,7 +21430,7 @@ async def get_private_endpoint_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) @@ -21486,7 +21486,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21523,8 +21523,8 @@ async def begin_approve_or_reject_private_endpoint_connection( :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_06_01.models.PrivateLinkConnectionApprovalRequestResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnectionResource or the result of cls(response) @@ -21618,7 +21618,7 @@ async def _delete_private_endpoint_connection_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21655,8 +21655,8 @@ async def begin_delete_private_endpoint_connection( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either object or the result of cls(response) @@ -21760,7 +21760,7 @@ async def get_private_link_resources( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) @@ -21843,7 +21843,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21914,7 +21914,7 @@ async def get_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -21987,7 +21987,7 @@ async def delete_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22055,7 +22055,7 @@ async def get_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22144,7 +22144,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22219,7 +22219,7 @@ async def get_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22308,7 +22308,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22390,7 +22390,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22460,7 +22460,7 @@ async def get_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22539,7 +22539,7 @@ async def create_or_update_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22609,7 +22609,7 @@ async def delete_public_certificate_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22681,7 +22681,7 @@ async def list_publishing_profile_xml_with_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -22748,7 +22748,7 @@ async def reset_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22823,7 +22823,7 @@ async def restart_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22876,7 +22876,7 @@ async def _restore_from_backup_blob_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22907,8 +22907,8 @@ async def begin_restore_from_backup_blob_slot( :type request: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23005,7 +23005,7 @@ async def _restore_from_deleted_app_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23035,8 +23035,8 @@ async def begin_restore_from_deleted_app_slot( :type restore_request: ~azure.mgmt.web.v2020_06_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23133,7 +23133,7 @@ async def _restore_snapshot_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23164,8 +23164,8 @@ async def begin_restore_snapshot_slot( :type restore_request: ~azure.mgmt.web.v2020_06_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23288,7 +23288,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23358,7 +23358,7 @@ async def get_site_extension_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23412,7 +23412,7 @@ async def _install_site_extension_slot_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23451,8 +23451,8 @@ async def begin_install_site_extension_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -23567,7 +23567,7 @@ async def delete_site_extension_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23620,7 +23620,7 @@ async def _copy_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23652,8 +23652,8 @@ async def begin_copy_slot( :type copy_slot_entity: ~azure.mgmt.web.v2020_06_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23787,7 +23787,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23843,7 +23843,7 @@ async def _swap_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23874,8 +23874,8 @@ async def begin_swap_slot( :type slot_swap_entity: ~azure.mgmt.web.v2020_06_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23997,7 +23997,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24078,7 +24078,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24144,7 +24144,7 @@ async def get_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24207,7 +24207,7 @@ async def _create_or_update_source_control_slot_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24248,8 +24248,8 @@ async def begin_create_or_update_source_control_slot( :type site_source_control: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) @@ -24359,7 +24359,7 @@ async def delete_source_control_slot( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24430,7 +24430,7 @@ async def update_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24503,7 +24503,7 @@ async def start_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24559,7 +24559,7 @@ async def _start_network_trace_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24602,8 +24602,8 @@ async def begin_start_network_trace_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -24715,7 +24715,7 @@ async def stop_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24777,7 +24777,7 @@ async def stop_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24839,7 +24839,7 @@ async def sync_repository_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24901,7 +24901,7 @@ async def sync_function_triggers_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24980,7 +24980,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25050,7 +25050,7 @@ async def get_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25122,7 +25122,7 @@ async def delete_triggered_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25205,7 +25205,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25280,7 +25280,7 @@ async def get_triggered_web_job_history_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25352,7 +25352,7 @@ async def run_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25439,7 +25439,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25505,7 +25505,7 @@ async def list_vnet_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -25575,7 +25575,7 @@ async def get_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25654,7 +25654,7 @@ async def create_or_update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25725,7 +25725,7 @@ async def delete_vnet_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25801,7 +25801,7 @@ async def update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25875,7 +25875,7 @@ async def get_vnet_connection_gateway_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25959,7 +25959,7 @@ async def create_or_update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -26041,7 +26041,7 @@ async def update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -26123,7 +26123,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26193,7 +26193,7 @@ async def get_web_job_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) @@ -26281,7 +26281,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26335,7 +26335,7 @@ async def _swap_slot_with_production_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26362,8 +26362,8 @@ async def begin_swap_slot_with_production( :type slot_swap_entity: ~azure.mgmt.web.v2020_06_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -26479,7 +26479,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26556,7 +26556,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26617,7 +26617,7 @@ async def get_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26678,7 +26678,7 @@ async def _create_or_update_source_control_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26715,8 +26715,8 @@ async def begin_create_or_update_source_control( :type site_source_control: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) @@ -26819,7 +26819,7 @@ async def delete_source_control( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26885,7 +26885,7 @@ async def update_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26953,7 +26953,7 @@ async def start( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27007,7 +27007,7 @@ async def _start_network_trace_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27047,8 +27047,8 @@ async def begin_start_network_trace( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -27153,7 +27153,7 @@ async def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27211,7 +27211,7 @@ async def stop_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27269,7 +27269,7 @@ async def sync_repository( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27327,7 +27327,7 @@ async def sync_function_triggers( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27401,7 +27401,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27466,7 +27466,7 @@ async def get_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -27533,7 +27533,7 @@ async def delete_triggered_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27611,7 +27611,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27681,7 +27681,7 @@ async def get_triggered_web_job_history( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -27748,7 +27748,7 @@ async def run_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27830,7 +27830,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27891,7 +27891,7 @@ async def list_vnet_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -27956,7 +27956,7 @@ async def get_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28030,7 +28030,7 @@ async def create_or_update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28096,7 +28096,7 @@ async def delete_vnet_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28167,7 +28167,7 @@ async def update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28236,7 +28236,7 @@ async def get_vnet_connection_gateway( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -28315,7 +28315,7 @@ async def create_or_update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28392,7 +28392,7 @@ async def update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28469,7 +28469,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28534,7 +28534,7 @@ async def get_web_job( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_site_management_client_operations.py index 196b138db9f1..7cb101bd0e0d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_site_management_client_operations.py @@ -59,7 +59,7 @@ async def get_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -116,7 +116,7 @@ async def update_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -181,7 +181,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -237,7 +237,7 @@ async def get_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -301,7 +301,7 @@ async def update_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -380,7 +380,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -449,7 +449,7 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceNameAvailability', pipeline_response) @@ -502,7 +502,7 @@ async def get_subscription_deployment_locations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeploymentLocations', pipeline_response) @@ -594,7 +594,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -674,7 +674,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -743,7 +743,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -796,7 +796,7 @@ async def list_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SkuInfos', pipeline_response) @@ -858,7 +858,7 @@ async def verify_hosting_environment_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetValidationFailureDetails', pipeline_response) @@ -923,7 +923,7 @@ async def move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -985,7 +985,7 @@ async def validate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateResponse', pipeline_response) @@ -1050,7 +1050,7 @@ async def validate_move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/models/_models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/models/_models.py index 6b1ed1fdf867..c538e69adfd1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/models/_models.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/models/_models.py @@ -4200,8 +4200,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] :param support_credentials: Gets or sets whether CORS requests with credentials are allowed. @@ -6100,8 +6100,8 @@ class DomainControlCenterSsoRequest(msrest.serialization.Model): :vartype url: str :ivar post_parameter_key: Post parameter key. :vartype post_parameter_key: str - :ivar post_parameter_value: Post parameter value. Client should use 'application/x-www-form- - urlencoded' encoding for this value. + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. :vartype post_parameter_value: str """ @@ -7981,8 +7981,8 @@ class IpSecurityRestriction(msrest.serialization.Model): :param description: IP restriction rule description. :type description: str :param headers: IP restriction rule headers. - X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded- - Host#Examples). + X-Forwarded-Host + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). The matching logic is .. @@ -7993,8 +7993,8 @@ class IpSecurityRestriction(msrest.serialization.Model): but not the root domain contoso.com or multi-level foo.bar.contoso.com * Unicode host names are allowed but are converted to Punycode for matching. - X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded- - For#Examples). + X-Forwarded-For + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). The matching logic is .. @@ -11585,8 +11585,8 @@ class Site(Resource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -11809,8 +11809,8 @@ class SiteAuthSettings(ProxyOnlyResource): When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. - More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect- - discovery-1_0.html. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. :type issuer: str :param validate_issuer: Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. @@ -11905,8 +11905,8 @@ class SiteAuthSettings(ProxyOnlyResource): :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. - Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en- - us/library/dn631845.aspx. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. :type microsoft_account_o_auth_scopes: list[str] :param is_auth_from_file: "true" if the auth config settings should be read from a file, "false" otherwise. @@ -13146,8 +13146,8 @@ class SitePatchResource(ProxyOnlyResource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -16358,8 +16358,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str :param is_swift: Flag that is used to denote if this is VNET injection. :type is_swift: bool diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/models/_models_py3.py index f4b8a591914f..7f5eb1c2577a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/models/_models_py3.py @@ -4625,8 +4625,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] :param support_credentials: Gets or sets whether CORS requests with credentials are allowed. @@ -6711,8 +6711,8 @@ class DomainControlCenterSsoRequest(msrest.serialization.Model): :vartype url: str :ivar post_parameter_key: Post parameter key. :vartype post_parameter_key: str - :ivar post_parameter_value: Post parameter value. Client should use 'application/x-www-form- - urlencoded' encoding for this value. + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. :vartype post_parameter_value: str """ @@ -8793,8 +8793,8 @@ class IpSecurityRestriction(msrest.serialization.Model): :param description: IP restriction rule description. :type description: str :param headers: IP restriction rule headers. - X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded- - Host#Examples). + X-Forwarded-Host + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). The matching logic is .. @@ -8805,8 +8805,8 @@ class IpSecurityRestriction(msrest.serialization.Model): but not the root domain contoso.com or multi-level foo.bar.contoso.com * Unicode host names are allowed but are converted to Punycode for matching. - X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded- - For#Examples). + X-Forwarded-For + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). The matching logic is .. @@ -12807,8 +12807,8 @@ class Site(Resource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -13056,8 +13056,8 @@ class SiteAuthSettings(ProxyOnlyResource): When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. - More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect- - discovery-1_0.html. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. :type issuer: str :param validate_issuer: Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. @@ -13152,8 +13152,8 @@ class SiteAuthSettings(ProxyOnlyResource): :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. - Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en- - us/library/dn631845.aspx. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. :type microsoft_account_o_auth_scopes: list[str] :param is_auth_from_file: "true" if the auth config settings should be read from a file, "false" otherwise. @@ -14609,8 +14609,8 @@ class SitePatchResource(ProxyOnlyResource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -18153,8 +18153,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str :param is_swift: Flag that is used to denote if this is VNET injection. :type is_swift: bool diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_certificate_orders_operations.py index 78f6d06ad982..969491390a52 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_certificate_orders_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -168,7 +168,7 @@ def validate_purchase_information( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -239,7 +239,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -301,7 +301,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) @@ -356,7 +356,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -391,8 +391,8 @@ def begin_create_or_update( :type certificate_distinguished_name: ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceCertificateOrder or the result of cls(response) @@ -496,7 +496,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -563,7 +563,7 @@ def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -645,7 +645,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -711,7 +711,7 @@ def get_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) @@ -768,7 +768,7 @@ def _create_or_update_certificate_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -806,8 +806,8 @@ def begin_create_or_update_certificate( :type key_vault_certificate: ~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceCertificateResource or the result of cls(response) @@ -917,7 +917,7 @@ def delete_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -988,7 +988,7 @@ def update_certificate( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1062,7 +1062,7 @@ def reissue( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1129,7 +1129,7 @@ def renew( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1188,7 +1188,7 @@ def resend_email( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1255,7 +1255,7 @@ def resend_request_emails( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1322,7 +1322,7 @@ def retrieve_site_seal( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteSeal', pipeline_response) @@ -1384,7 +1384,7 @@ def verify_domain_ownership( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1443,7 +1443,7 @@ def retrieve_certificate_actions( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateOrderAction]', pipeline_response) @@ -1505,7 +1505,7 @@ def retrieve_certificate_email_history( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateEmail]', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_environments_operations.py index b0774386d12a..f9743f31fecb 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_environments_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -180,7 +180,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -242,7 +242,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) @@ -297,7 +297,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -335,8 +335,8 @@ def begin_create_or_update( :type hosting_environment_envelope: ~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) @@ -430,7 +430,7 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -459,8 +459,8 @@ def begin_delete( :type force_delete: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -569,7 +569,7 @@ def update( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -654,7 +654,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -716,7 +716,7 @@ def get_vip_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressResponse', pipeline_response) @@ -771,7 +771,7 @@ def _change_vnet_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -806,8 +806,8 @@ def begin_change_vnet( :type vnet_info: ~azure.mgmt.web.v2020_06_01.models.VirtualNetworkProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -869,7 +869,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -974,7 +974,7 @@ def list_diagnostics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', pipeline_response) @@ -1040,7 +1040,7 @@ def get_diagnostics_item( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostingEnvironmentDiagnostics', pipeline_response) @@ -1119,7 +1119,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1197,7 +1197,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1259,7 +1259,7 @@ def get_multi_role_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -1314,7 +1314,7 @@ def _create_or_update_multi_role_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1349,8 +1349,8 @@ def begin_create_or_update_multi_role_pool( :type multi_role_pool_envelope: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -1462,7 +1462,7 @@ def update_multi_role_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1549,7 +1549,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1627,7 +1627,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1705,7 +1705,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1783,7 +1783,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1845,7 +1845,7 @@ def list_operations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Operation]', pipeline_response) @@ -1924,7 +1924,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1986,7 +1986,7 @@ def reboot( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2032,7 +2032,7 @@ def _resume_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2064,8 +2064,8 @@ def begin_resume( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2119,7 +2119,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2239,7 +2239,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2322,7 +2322,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2371,7 +2371,7 @@ def _suspend_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2403,8 +2403,8 @@ def begin_suspend( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2458,7 +2458,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2586,7 +2586,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2664,7 +2664,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2730,7 +2730,7 @@ def get_worker_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -2787,7 +2787,7 @@ def _create_or_update_worker_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2825,8 +2825,8 @@ def begin_create_or_update_worker_pool( :type worker_pool_envelope: ~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -2944,7 +2944,7 @@ def update_worker_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -3035,7 +3035,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3117,7 +3117,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3199,7 +3199,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3281,7 +3281,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_plans_operations.py index 58ecb5153169..744dc4bf3273 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_plans_operations.py @@ -113,7 +113,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -187,7 +187,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -249,7 +249,7 @@ def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -306,7 +306,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -341,8 +341,8 @@ def begin_create_or_update( :type app_service_plan: ~azure.mgmt.web.v2020_06_01.models.AppServicePlan :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServicePlan or the result of cls(response) @@ -446,7 +446,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -513,7 +513,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -579,7 +579,7 @@ def list_capabilities( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Capability]', pipeline_response) @@ -649,7 +649,7 @@ def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -719,7 +719,7 @@ def delete_hybrid_connection( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -786,7 +786,7 @@ def list_hybrid_connection_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -872,7 +872,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -934,7 +934,7 @@ def get_hybrid_connection_plan_limit( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionLimits', pipeline_response) @@ -1012,7 +1012,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1081,7 +1081,7 @@ def restart_web_apps( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1174,7 +1174,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1236,7 +1236,7 @@ def get_server_farm_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -1320,7 +1320,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1382,7 +1382,7 @@ def list_vnets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -1448,7 +1448,7 @@ def get_vnet_from_server_farm( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1520,7 +1520,7 @@ def get_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1598,7 +1598,7 @@ def update_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1665,7 +1665,7 @@ def list_routes_for_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetRoute]', pipeline_response) @@ -1735,7 +1735,7 @@ def get_route_for_vnet( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1815,7 +1815,7 @@ def create_or_update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1887,7 +1887,7 @@ def delete_vnet_route( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1962,7 +1962,7 @@ def update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -2030,7 +2030,7 @@ def reboot_worker( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificate_registration_provider_operations.py index fd50f5bb7a39..01db83934304 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificate_registration_provider_operations.py @@ -101,7 +101,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificates_operations.py index 366917731345..e4e76844d885 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificates_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -310,7 +310,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -372,7 +372,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -439,7 +439,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_deleted_web_apps_operations.py index d5b6fb4b5625..6de1c8f43a8b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_deleted_web_apps_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ def get_deleted_web_app_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeletedSite', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_diagnostics_operations.py index 2f99e8b6520d..b628ccead3ed 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_diagnostics_operations.py @@ -113,7 +113,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -194,7 +194,7 @@ def get_hosting_environment_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -272,7 +272,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -353,7 +353,7 @@ def get_site_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -431,7 +431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -497,7 +497,7 @@ def get_site_diagnostic_category( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -579,7 +579,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -649,7 +649,7 @@ def get_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -734,7 +734,7 @@ def execute_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -816,7 +816,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -886,7 +886,7 @@ def get_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -971,7 +971,7 @@ def execute_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) @@ -1053,7 +1053,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1138,7 +1138,7 @@ def get_site_detector_response_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -1220,7 +1220,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1290,7 +1290,7 @@ def get_site_diagnostic_category_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -1376,7 +1376,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1450,7 +1450,7 @@ def get_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -1539,7 +1539,7 @@ def execute_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -1625,7 +1625,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1699,7 +1699,7 @@ def get_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -1788,7 +1788,7 @@ def execute_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domain_registration_provider_operations.py index ac90a866057e..239fee0da924 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domain_registration_provider_operations.py @@ -101,7 +101,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domains_operations.py index 0f7cb4687633..30b69e8fad7d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domains_operations.py @@ -98,7 +98,7 @@ def check_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainAvailabilityCheckResult', pipeline_response) @@ -168,7 +168,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -222,7 +222,7 @@ def get_control_center_sso_request( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainControlCenterSsoRequest', pipeline_response) @@ -303,7 +303,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -377,7 +377,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -439,7 +439,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Domain', pipeline_response) @@ -494,7 +494,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -529,8 +529,8 @@ def begin_create_or_update( :type domain: ~azure.mgmt.web.v2020_06_01.models.Domain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Domain or the result of cls(response) @@ -640,7 +640,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -707,7 +707,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -789,7 +789,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -855,7 +855,7 @@ def get_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -875,10 +875,10 @@ def create_or_update_ownership_identifier( **kwargs # type: Any ): # type: (...) -> "_models.DomainOwnershipIdentifier" - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -930,7 +930,7 @@ def create_or_update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -996,7 +996,7 @@ def delete_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1013,10 +1013,10 @@ def update_ownership_identifier( **kwargs # type: Any ): # type: (...) -> "_models.DomainOwnershipIdentifier" - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1068,7 +1068,7 @@ def update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -1130,7 +1130,7 @@ def renew( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py index 4a22cac9c13f..108ba2af3aa7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py @@ -105,7 +105,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -247,7 +247,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_recommendations_operations.py index c664f0153794..52e5c6bd5ba8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_recommendations_operations.py @@ -117,7 +117,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -171,7 +171,7 @@ def reset_all_filters( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -227,7 +227,7 @@ def disable_recommendation_for_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -315,7 +315,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -405,7 +405,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -471,7 +471,7 @@ def disable_all_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -534,7 +534,7 @@ def reset_all_filters_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -609,7 +609,7 @@ def get_rule_details_by_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -679,7 +679,7 @@ def disable_recommendation_for_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -767,7 +767,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -857,7 +857,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -919,7 +919,7 @@ def disable_all_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -978,7 +978,7 @@ def reset_all_filters_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1053,7 +1053,7 @@ def get_rule_details_by_web_app( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -1119,7 +1119,7 @@ def disable_recommendation_for_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_resource_health_metadata_operations.py index 0b4e8d6febfd..ffc8281c288c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_resource_health_metadata_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -179,7 +179,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -258,7 +258,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -320,7 +320,7 @@ def get_by_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) @@ -403,7 +403,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -469,7 +469,7 @@ def get_by_site_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_static_sites_operations.py index 1929ae73b9fa..852328ccae36 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_static_sites_operations.py @@ -101,7 +101,7 @@ def preview_workflow( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSitesWorkflowPreview', pipeline_response) @@ -171,7 +171,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -245,7 +245,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -307,7 +307,7 @@ def get_static_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) @@ -378,7 +378,7 @@ def create_or_update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -444,7 +444,7 @@ def delete_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -512,7 +512,7 @@ def update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -598,7 +598,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -668,7 +668,7 @@ def delete_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -744,7 +744,7 @@ def update_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserARMResource', pipeline_response) @@ -822,7 +822,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -888,7 +888,7 @@ def get_static_site_build( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteBuildARMResource', pipeline_response) @@ -954,7 +954,7 @@ def delete_static_site_build( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1025,7 +1025,7 @@ def create_or_update_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1111,7 +1111,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1177,7 +1177,7 @@ def list_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1251,7 +1251,7 @@ def create_or_update_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1325,7 +1325,7 @@ def create_user_roles_invitation_link( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', pipeline_response) @@ -1403,7 +1403,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1470,7 +1470,7 @@ def create_or_update_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1540,7 +1540,7 @@ def delete_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1603,7 +1603,7 @@ def validate_custom_domain_can_be_added_to_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1662,7 +1662,7 @@ def detach_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1737,7 +1737,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1799,7 +1799,7 @@ def list_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1865,7 +1865,7 @@ def list_static_site_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1935,7 +1935,7 @@ def reset_static_site_api_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_top_level_domains_operations.py index b99cc1c4a7bd..458d42e42005 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_top_level_domains_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -162,7 +162,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TopLevelDomain', pipeline_response) @@ -247,7 +247,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_apps_operations.py index 53947f7d55cf..4825e280bd65 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_apps_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -186,7 +186,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -248,7 +248,7 @@ def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -305,7 +305,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -342,8 +342,8 @@ def begin_create_or_update( :type site_envelope: ~azure.mgmt.web.v2020_06_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Site or the result of cls(response) @@ -458,7 +458,7 @@ def delete( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -527,7 +527,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -598,7 +598,7 @@ def analyze_custom_hostname( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -668,7 +668,7 @@ def apply_slot_config_to_production( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -736,7 +736,7 @@ def backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -814,7 +814,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -880,7 +880,7 @@ def get_backup_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -946,7 +946,7 @@ def delete_backup( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1019,7 +1019,7 @@ def list_backup_status_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -1076,7 +1076,7 @@ def _restore_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1107,8 +1107,8 @@ def begin_restore( :type request: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -1212,7 +1212,7 @@ def get_basic_publishing_credentials_policies( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', pipeline_response) @@ -1274,7 +1274,7 @@ def get_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1344,7 +1344,7 @@ def update_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1406,7 +1406,7 @@ def get_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1476,7 +1476,7 @@ def update_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1554,7 +1554,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1624,7 +1624,7 @@ def update_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1686,7 +1686,7 @@ def list_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1756,7 +1756,7 @@ def update_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1818,7 +1818,7 @@ def get_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1889,7 +1889,7 @@ def update_auth_settings_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -1951,7 +1951,7 @@ def get_auth_settings_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -2021,7 +2021,7 @@ def update_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -2083,7 +2083,7 @@ def list_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -2153,7 +2153,7 @@ def update_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2215,7 +2215,7 @@ def delete_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2274,7 +2274,7 @@ def get_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2344,7 +2344,7 @@ def update_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2406,7 +2406,7 @@ def list_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2468,7 +2468,7 @@ def get_diagnostic_logs_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2539,7 +2539,7 @@ def update_diagnostic_logs_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2609,7 +2609,7 @@ def update_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2671,7 +2671,7 @@ def list_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2720,7 +2720,7 @@ def _list_publishing_credentials_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -2748,8 +2748,8 @@ def begin_list_publishing_credentials( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either User or the result of cls(response) @@ -2860,7 +2860,7 @@ def update_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2922,7 +2922,7 @@ def list_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2985,7 +2985,7 @@ def list_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3056,7 +3056,7 @@ def update_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3119,7 +3119,7 @@ def get_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3189,7 +3189,7 @@ def create_or_update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3259,7 +3259,7 @@ def update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3338,7 +3338,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3404,7 +3404,7 @@ def get_configuration_snapshot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3470,7 +3470,7 @@ def recover_site_configuration_snapshot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3671,7 +3671,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3737,7 +3737,7 @@ def get_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -3805,7 +3805,7 @@ def delete_continuous_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3868,7 +3868,7 @@ def start_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3931,7 +3931,7 @@ def stop_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4006,7 +4006,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4072,7 +4072,7 @@ def get_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4146,7 +4146,7 @@ def create_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4212,7 +4212,7 @@ def delete_deployment( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4276,7 +4276,7 @@ def list_deployment_log( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4348,7 +4348,7 @@ def discover_backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -4426,7 +4426,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4492,7 +4492,7 @@ def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4567,7 +4567,7 @@ def create_or_update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4633,7 +4633,7 @@ def delete_domain_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4705,7 +4705,7 @@ def update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4767,7 +4767,7 @@ def get_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -4822,7 +4822,7 @@ def _create_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -4855,8 +4855,8 @@ def begin_create_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2020_06_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -4960,7 +4960,7 @@ def get_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -5040,7 +5040,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5102,7 +5102,7 @@ def get_functions_admin_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -5168,7 +5168,7 @@ def get_function( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -5227,7 +5227,7 @@ def _create_function_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -5261,8 +5261,8 @@ def begin_create_function( :type function_envelope: ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -5372,7 +5372,7 @@ def delete_function( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5447,7 +5447,7 @@ def create_or_update_function_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5521,7 +5521,7 @@ def delete_function_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5584,7 +5584,7 @@ def list_function_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -5650,7 +5650,7 @@ def list_function_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -5712,7 +5712,7 @@ def list_host_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -5774,7 +5774,7 @@ def list_sync_status( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5833,7 +5833,7 @@ def sync_functions( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5908,7 +5908,7 @@ def create_or_update_host_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5982,7 +5982,7 @@ def delete_host_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6057,7 +6057,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6123,7 +6123,7 @@ def get_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6198,7 +6198,7 @@ def create_or_update_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6264,7 +6264,7 @@ def delete_host_name_binding( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6331,7 +6331,7 @@ def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6409,7 +6409,7 @@ def create_or_update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6479,7 +6479,7 @@ def delete_hybrid_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6554,7 +6554,7 @@ def update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6616,7 +6616,7 @@ def list_hybrid_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6679,7 +6679,7 @@ def list_relay_service_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6745,7 +6745,7 @@ def get_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6820,7 +6820,7 @@ def create_or_update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6886,7 +6886,7 @@ def delete_relay_service_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6958,7 +6958,7 @@ def update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -7036,7 +7036,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7102,7 +7102,7 @@ def get_instance_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -7168,7 +7168,7 @@ def get_instance_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -7225,7 +7225,7 @@ def _create_instance_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7261,8 +7261,8 @@ def begin_create_instance_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2020_06_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -7372,7 +7372,7 @@ def get_instance_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7458,7 +7458,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7530,7 +7530,7 @@ def get_instance_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7604,7 +7604,7 @@ def delete_instance_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -7673,7 +7673,7 @@ def get_instance_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7763,7 +7763,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7839,7 +7839,7 @@ def get_instance_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7929,7 +7929,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7991,7 +7991,7 @@ def is_cloneable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -8069,7 +8069,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8131,7 +8131,7 @@ def list_sync_function_triggers( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -8188,7 +8188,7 @@ def _migrate_storage_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) @@ -8222,8 +8222,8 @@ def begin_migrate_storage( :type migration_options: ~azure.mgmt.web.v2020_06_01.models.StorageMigrationOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either StorageMigrationResponse or the result of cls(response) @@ -8321,7 +8321,7 @@ def _migrate_my_sql_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Operation', pipeline_response) @@ -8352,8 +8352,8 @@ def begin_migrate_my_sql( :type migration_request_envelope: ~azure.mgmt.web.v2020_06_01.models.MigrateMySqlRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Operation or the result of cls(response) @@ -8458,7 +8458,7 @@ def get_migrate_my_sql_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -8520,7 +8520,7 @@ def get_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8594,7 +8594,7 @@ def create_or_update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8656,7 +8656,7 @@ def delete_swift_virtual_network( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -8727,7 +8727,7 @@ def update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8793,7 +8793,7 @@ def list_network_features( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -8862,7 +8862,7 @@ def get_network_trace_operation( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8943,7 +8943,7 @@ def start_web_site_network_trace( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -9001,7 +9001,7 @@ def _start_web_site_network_trace_operation_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -9042,8 +9042,8 @@ def begin_start_web_site_network_trace_operation( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -9149,7 +9149,7 @@ def stop_web_site_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9213,7 +9213,7 @@ def get_network_traces( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9280,7 +9280,7 @@ def get_network_trace_operation_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -9351,7 +9351,7 @@ def get_network_traces_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9414,7 +9414,7 @@ def generate_new_site_publishing_password( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9496,7 +9496,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9558,7 +9558,7 @@ def get_site_php_error_log_flag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -9620,7 +9620,7 @@ def list_premier_add_ons( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9686,7 +9686,7 @@ def get_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9760,7 +9760,7 @@ def add_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9826,7 +9826,7 @@ def delete_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9897,7 +9897,7 @@ def update_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9960,7 +9960,7 @@ def get_private_access( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -10031,7 +10031,7 @@ def put_private_access_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -10110,7 +10110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10177,7 +10177,7 @@ def get_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10246,7 +10246,7 @@ def delete_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10310,7 +10310,7 @@ def get_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10395,7 +10395,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10466,7 +10466,7 @@ def get_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10551,7 +10551,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10629,7 +10629,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10695,7 +10695,7 @@ def get_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10770,7 +10770,7 @@ def create_or_update_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10836,7 +10836,7 @@ def delete_public_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10904,7 +10904,7 @@ def list_publishing_profile_xml_with_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -10967,7 +10967,7 @@ def reset_production_slot_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11038,7 +11038,7 @@ def restart( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11090,7 +11090,7 @@ def _restore_from_backup_blob_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11118,8 +11118,8 @@ def begin_restore_from_backup_blob( :type request: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11213,7 +11213,7 @@ def _restore_from_deleted_app_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11241,8 +11241,8 @@ def begin_restore_from_deleted_app( :type restore_request: ~azure.mgmt.web.v2020_06_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11336,7 +11336,7 @@ def _restore_snapshot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11365,8 +11365,8 @@ def begin_restore_snapshot( :type restore_request: ~azure.mgmt.web.v2020_06_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11483,7 +11483,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11549,7 +11549,7 @@ def get_site_extension( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11602,7 +11602,7 @@ def _install_site_extension_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11638,8 +11638,8 @@ def begin_install_site_extension( :type site_extension_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -11748,7 +11748,7 @@ def delete_site_extension( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11800,7 +11800,7 @@ def _copy_production_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11829,8 +11829,8 @@ def begin_copy_production_slot( :type copy_slot_entity: ~azure.mgmt.web.v2020_06_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11947,7 +11947,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12013,7 +12013,7 @@ def get_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -12072,7 +12072,7 @@ def _create_or_update_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -12113,8 +12113,8 @@ def begin_create_or_update_slot( :type site_envelope: ~azure.mgmt.web.v2020_06_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Site or the result of cls(response) @@ -12237,7 +12237,7 @@ def delete_slot( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12311,7 +12311,7 @@ def update_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -12386,7 +12386,7 @@ def analyze_custom_hostname_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -12461,7 +12461,7 @@ def apply_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12534,7 +12534,7 @@ def backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12617,7 +12617,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12688,7 +12688,7 @@ def get_backup_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12759,7 +12759,7 @@ def delete_backup_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12836,7 +12836,7 @@ def list_backup_status_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12895,7 +12895,7 @@ def _restore_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12930,8 +12930,8 @@ def begin_restore_slot( :type request: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -13057,7 +13057,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -13132,7 +13132,7 @@ def update_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13199,7 +13199,7 @@ def list_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13273,7 +13273,7 @@ def update_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13340,7 +13340,7 @@ def get_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13415,7 +13415,7 @@ def update_auth_settings_v2_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -13482,7 +13482,7 @@ def get_auth_settings_v2_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -13557,7 +13557,7 @@ def update_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13624,7 +13624,7 @@ def list_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13699,7 +13699,7 @@ def update_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13766,7 +13766,7 @@ def delete_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -13830,7 +13830,7 @@ def get_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13905,7 +13905,7 @@ def update_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13972,7 +13972,7 @@ def list_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -14039,7 +14039,7 @@ def get_diagnostic_logs_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -14115,7 +14115,7 @@ def update_diagnostic_logs_config_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -14190,7 +14190,7 @@ def update_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -14257,7 +14257,7 @@ def list_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -14308,7 +14308,7 @@ def _list_publishing_credentials_slot_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -14340,8 +14340,8 @@ def begin_list_publishing_credentials_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either User or the result of cls(response) @@ -14458,7 +14458,7 @@ def update_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14524,7 +14524,7 @@ def list_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14592,7 +14592,7 @@ def get_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14667,7 +14667,7 @@ def create_or_update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14742,7 +14742,7 @@ def update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14826,7 +14826,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14897,7 +14897,7 @@ def get_configuration_snapshot_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14968,7 +14968,7 @@ def recover_site_configuration_snapshot_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15182,7 +15182,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15253,7 +15253,7 @@ def get_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -15326,7 +15326,7 @@ def delete_continuous_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15394,7 +15394,7 @@ def start_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15462,7 +15462,7 @@ def stop_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15542,7 +15542,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15613,7 +15613,7 @@ def get_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15692,7 +15692,7 @@ def create_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15763,7 +15763,7 @@ def delete_deployment_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15832,7 +15832,7 @@ def list_deployment_log_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15909,7 +15909,7 @@ def discover_backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -15992,7 +15992,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16063,7 +16063,7 @@ def get_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -16143,7 +16143,7 @@ def create_or_update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -16214,7 +16214,7 @@ def delete_domain_ownership_identifier_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16291,7 +16291,7 @@ def update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -16357,7 +16357,7 @@ def get_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -16414,7 +16414,7 @@ def _create_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16450,8 +16450,8 @@ def begin_create_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2020_06_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -16561,7 +16561,7 @@ def get_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16645,7 +16645,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16711,7 +16711,7 @@ def get_functions_admin_token_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -16781,7 +16781,7 @@ def get_instance_function_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16842,7 +16842,7 @@ def _create_instance_function_slot_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -16879,8 +16879,8 @@ def begin_create_instance_function_slot( :type function_envelope: ~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -16996,7 +16996,7 @@ def delete_instance_function_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17075,7 +17075,7 @@ def create_or_update_function_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -17153,7 +17153,7 @@ def delete_function_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17220,7 +17220,7 @@ def list_function_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -17290,7 +17290,7 @@ def list_function_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -17356,7 +17356,7 @@ def list_host_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -17422,7 +17422,7 @@ def list_sync_status_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17485,7 +17485,7 @@ def sync_functions_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17564,7 +17564,7 @@ def create_or_update_host_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -17642,7 +17642,7 @@ def delete_host_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17722,7 +17722,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17793,7 +17793,7 @@ def get_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17873,7 +17873,7 @@ def create_or_update_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17944,7 +17944,7 @@ def delete_host_name_binding_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18015,7 +18015,7 @@ def get_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18097,7 +18097,7 @@ def create_or_update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18171,7 +18171,7 @@ def delete_hybrid_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18250,7 +18250,7 @@ def update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18316,7 +18316,7 @@ def list_hybrid_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18384,7 +18384,7 @@ def list_relay_service_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18455,7 +18455,7 @@ def get_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18535,7 +18535,7 @@ def create_or_update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18606,7 +18606,7 @@ def delete_relay_service_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18683,7 +18683,7 @@ def update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18766,7 +18766,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -18837,7 +18837,7 @@ def get_instance_info_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -18907,7 +18907,7 @@ def get_instance_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -18966,7 +18966,7 @@ def _create_instance_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19005,8 +19005,8 @@ def begin_create_instance_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2020_06_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -19122,7 +19122,7 @@ def get_instance_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19213,7 +19213,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19290,7 +19290,7 @@ def get_instance_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19369,7 +19369,7 @@ def delete_instance_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -19443,7 +19443,7 @@ def get_instance_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19538,7 +19538,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19619,7 +19619,7 @@ def get_instance_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19714,7 +19714,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19781,7 +19781,7 @@ def is_cloneable_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -19864,7 +19864,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19930,7 +19930,7 @@ def list_sync_function_triggers_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -19997,7 +19997,7 @@ def get_migrate_my_sql_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -20064,7 +20064,7 @@ def get_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -20143,7 +20143,7 @@ def create_or_update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -20210,7 +20210,7 @@ def delete_swift_virtual_network_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20286,7 +20286,7 @@ def update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -20357,7 +20357,7 @@ def list_network_features_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -20431,7 +20431,7 @@ def get_network_trace_operation_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20516,7 +20516,7 @@ def start_web_site_network_trace_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -20576,7 +20576,7 @@ def _start_web_site_network_trace_operation_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20620,8 +20620,8 @@ def begin_start_web_site_network_trace_operation_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -20733,7 +20733,7 @@ def stop_web_site_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20802,7 +20802,7 @@ def get_network_traces_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20874,7 +20874,7 @@ def get_network_trace_operation_slot_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20950,7 +20950,7 @@ def get_network_traces_slot_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -21018,7 +21018,7 @@ def generate_new_site_publishing_password_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -21104,7 +21104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21170,7 +21170,7 @@ def get_site_php_error_log_flag_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -21237,7 +21237,7 @@ def list_premier_add_ons_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21308,7 +21308,7 @@ def get_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21387,7 +21387,7 @@ def add_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21458,7 +21458,7 @@ def delete_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -21534,7 +21534,7 @@ def update_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21601,7 +21601,7 @@ def get_private_access_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21676,7 +21676,7 @@ def put_private_access_vnet_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21742,7 +21742,7 @@ def get_private_endpoint_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) @@ -21799,7 +21799,7 @@ def _approve_or_reject_private_endpoint_connection_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21837,8 +21837,8 @@ def begin_approve_or_reject_private_endpoint_connection( :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_06_01.models.PrivateLinkConnectionApprovalRequestResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnectionResource or the result of cls(response) @@ -21933,7 +21933,7 @@ def _delete_private_endpoint_connection_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21971,8 +21971,8 @@ def begin_delete_private_endpoint_connection( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either object or the result of cls(response) @@ -22077,7 +22077,7 @@ def get_private_link_resources( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) @@ -22161,7 +22161,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22233,7 +22233,7 @@ def get_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22307,7 +22307,7 @@ def delete_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22376,7 +22376,7 @@ def get_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22466,7 +22466,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22542,7 +22542,7 @@ def get_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22632,7 +22632,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22715,7 +22715,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22786,7 +22786,7 @@ def get_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22866,7 +22866,7 @@ def create_or_update_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22937,7 +22937,7 @@ def delete_public_certificate_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23010,7 +23010,7 @@ def list_publishing_profile_xml_with_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -23078,7 +23078,7 @@ def reset_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23154,7 +23154,7 @@ def restart_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23208,7 +23208,7 @@ def _restore_from_backup_blob_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23240,8 +23240,8 @@ def begin_restore_from_backup_blob_slot( :type request: ~azure.mgmt.web.v2020_06_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23339,7 +23339,7 @@ def _restore_from_deleted_app_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23370,8 +23370,8 @@ def begin_restore_from_deleted_app_slot( :type restore_request: ~azure.mgmt.web.v2020_06_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23469,7 +23469,7 @@ def _restore_snapshot_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23501,8 +23501,8 @@ def begin_restore_snapshot_slot( :type restore_request: ~azure.mgmt.web.v2020_06_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23626,7 +23626,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23697,7 +23697,7 @@ def get_site_extension_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23752,7 +23752,7 @@ def _install_site_extension_slot_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23792,8 +23792,8 @@ def begin_install_site_extension_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -23909,7 +23909,7 @@ def delete_site_extension_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23963,7 +23963,7 @@ def _copy_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23996,8 +23996,8 @@ def begin_copy_slot( :type copy_slot_entity: ~azure.mgmt.web.v2020_06_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -24132,7 +24132,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24189,7 +24189,7 @@ def _swap_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24221,8 +24221,8 @@ def begin_swap_slot( :type slot_swap_entity: ~azure.mgmt.web.v2020_06_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -24345,7 +24345,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24427,7 +24427,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24494,7 +24494,7 @@ def get_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24558,7 +24558,7 @@ def _create_or_update_source_control_slot_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24600,8 +24600,8 @@ def begin_create_or_update_source_control_slot( :type site_source_control: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) @@ -24712,7 +24712,7 @@ def delete_source_control_slot( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24784,7 +24784,7 @@ def update_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24858,7 +24858,7 @@ def start_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24915,7 +24915,7 @@ def _start_network_trace_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24959,8 +24959,8 @@ def begin_start_network_trace_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -25073,7 +25073,7 @@ def stop_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25136,7 +25136,7 @@ def stop_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25199,7 +25199,7 @@ def sync_repository_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25262,7 +25262,7 @@ def sync_function_triggers_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25342,7 +25342,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25413,7 +25413,7 @@ def get_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25486,7 +25486,7 @@ def delete_triggered_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25570,7 +25570,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25646,7 +25646,7 @@ def get_triggered_web_job_history_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25719,7 +25719,7 @@ def run_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25807,7 +25807,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25874,7 +25874,7 @@ def list_vnet_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -25945,7 +25945,7 @@ def get_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -26025,7 +26025,7 @@ def create_or_update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -26097,7 +26097,7 @@ def delete_vnet_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26174,7 +26174,7 @@ def update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -26249,7 +26249,7 @@ def get_vnet_connection_gateway_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -26334,7 +26334,7 @@ def create_or_update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -26417,7 +26417,7 @@ def update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -26500,7 +26500,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26571,7 +26571,7 @@ def get_web_job_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) @@ -26660,7 +26660,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26715,7 +26715,7 @@ def _swap_slot_with_production_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26743,8 +26743,8 @@ def begin_swap_slot_with_production( :type slot_swap_entity: ~azure.mgmt.web.v2020_06_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -26861,7 +26861,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26939,7 +26939,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27001,7 +27001,7 @@ def get_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27063,7 +27063,7 @@ def _create_or_update_source_control_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27101,8 +27101,8 @@ def begin_create_or_update_source_control( :type site_source_control: ~azure.mgmt.web.v2020_06_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) @@ -27206,7 +27206,7 @@ def delete_source_control( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27273,7 +27273,7 @@ def update_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27342,7 +27342,7 @@ def start( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27397,7 +27397,7 @@ def _start_network_trace_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27438,8 +27438,8 @@ def begin_start_network_trace( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -27545,7 +27545,7 @@ def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27604,7 +27604,7 @@ def stop_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27663,7 +27663,7 @@ def sync_repository( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27722,7 +27722,7 @@ def sync_function_triggers( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27797,7 +27797,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27863,7 +27863,7 @@ def get_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -27931,7 +27931,7 @@ def delete_triggered_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28010,7 +28010,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28081,7 +28081,7 @@ def get_triggered_web_job_history( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -28149,7 +28149,7 @@ def run_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28232,7 +28232,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28294,7 +28294,7 @@ def list_vnet_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -28360,7 +28360,7 @@ def get_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28435,7 +28435,7 @@ def create_or_update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28502,7 +28502,7 @@ def delete_vnet_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28574,7 +28574,7 @@ def update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28644,7 +28644,7 @@ def get_vnet_connection_gateway( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -28724,7 +28724,7 @@ def create_or_update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28802,7 +28802,7 @@ def update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28880,7 +28880,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28946,7 +28946,7 @@ def get_web_job( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_site_management_client_operations.py index cf7559bc0c76..4e6dad6ca1b3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_site_management_client_operations.py @@ -64,7 +64,7 @@ def get_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -122,7 +122,7 @@ def update_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -188,7 +188,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -245,7 +245,7 @@ def get_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -310,7 +310,7 @@ def update_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -390,7 +390,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -460,7 +460,7 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceNameAvailability', pipeline_response) @@ -514,7 +514,7 @@ def get_subscription_deployment_locations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeploymentLocations', pipeline_response) @@ -607,7 +607,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -688,7 +688,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -758,7 +758,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -812,7 +812,7 @@ def list_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SkuInfos', pipeline_response) @@ -875,7 +875,7 @@ def verify_hosting_environment_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetValidationFailureDetails', pipeline_response) @@ -941,7 +941,7 @@ def move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1004,7 +1004,7 @@ def validate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateResponse', pipeline_response) @@ -1070,7 +1070,7 @@ def validate_move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/__init__.py index 32779ae9e1b0..45c59c58316a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/__init__.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['WebSiteManagementClient'] try: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_configuration.py index 7d1aa8d0daa7..c880cb0bc799 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_metadata.json index 421e5a53f91c..0d34a3198365 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "app_service_certificate_orders": "AppServiceCertificateOrdersOperations", @@ -69,211 +115,213 @@ "resource_health_metadata": "ResourceHealthMetadataOperations" }, "operation_mixins": { - "generate_github_access_token_for_appservice_cli_async" : { - "sync": { - "signature": "def generate_github_access_token_for_appservice_cli_async(\n self,\n code, # type: str\n state, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Exchange code for GitHub access token for AppService CLI.\n\nDescription for Exchange code for GitHub access token for AppService CLI.\n\n:param code: Code string to exchange for Github Access token.\n:type code: str\n:param state: State string used for verification.\n:type state: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AppserviceGithubToken, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.AppserviceGithubToken\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def generate_github_access_token_for_appservice_cli_async(\n self,\n code: str,\n state: str,\n **kwargs\n) -\u003e \"_models.AppserviceGithubToken\":\n", - "doc": "\"\"\"Exchange code for GitHub access token for AppService CLI.\n\nDescription for Exchange code for GitHub access token for AppService CLI.\n\n:param code: Code string to exchange for Github Access token.\n:type code: str\n:param state: State string used for verification.\n:type state: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AppserviceGithubToken, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.AppserviceGithubToken\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "code, state" - }, - "get_publishing_user" : { - "sync": { - "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "update_publishing_user" : { - "sync": { - "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_09_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_09_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "user_details" - }, - "list_source_controls" : { - "sync": { - "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "get_source_control" : { - "sync": { - "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "source_control_type" - }, - "update_source_control" : { - "sync": { - "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "source_control_type, request_message" - }, - "list_billing_meters" : { - "sync": { - "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "billing_location, os_type" - }, - "check_name_availability" : { - "sync": { - "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "name, type, is_fqdn" - }, - "get_subscription_deployment_locations" : { - "sync": { - "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "list_geo_regions" : { - "sync": { - "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" - }, - "list_site_identifiers_assigned_to_host_name" : { - "sync": { - "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "name_identifier" - }, - "list_premier_add_on_offers" : { - "sync": { - "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "list_skus" : { - "sync": { - "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "verify_hosting_environment_vnet" : { - "sync": { - "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_09_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_09_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "parameters" - }, - "move" : { - "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, move_resource_envelope" - }, - "validate" : { - "sync": { - "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_09_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_09_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, validate_request" - }, - "validate_move" : { - "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, move_resource_envelope" + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "operations": { + "generate_github_access_token_for_appservice_cli_async" : { + "sync": { + "signature": "def generate_github_access_token_for_appservice_cli_async(\n self,\n code, # type: str\n state, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Exchange code for GitHub access token for AppService CLI.\n\nDescription for Exchange code for GitHub access token for AppService CLI.\n\n:param code: Code string to exchange for Github Access token.\n:type code: str\n:param state: State string used for verification.\n:type state: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AppserviceGithubToken, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.AppserviceGithubToken\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def generate_github_access_token_for_appservice_cli_async(\n self,\n code: str,\n state: str,\n **kwargs\n) -\u003e \"_models.AppserviceGithubToken\":\n", + "doc": "\"\"\"Exchange code for GitHub access token for AppService CLI.\n\nDescription for Exchange code for GitHub access token for AppService CLI.\n\n:param code: Code string to exchange for Github Access token.\n:type code: str\n:param state: State string used for verification.\n:type state: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AppserviceGithubToken, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.AppserviceGithubToken\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "code, state" + }, + "get_publishing_user" : { + "sync": { + "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "update_publishing_user" : { + "sync": { + "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_09_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_09_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "user_details" + }, + "list_source_controls" : { + "sync": { + "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "get_source_control" : { + "sync": { + "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type" + }, + "update_source_control" : { + "sync": { + "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type, request_message" + }, + "list_billing_meters" : { + "sync": { + "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.BillingMeterCollection\"]:\n", + "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "billing_location, os_type" + }, + "check_name_availability" : { + "sync": { + "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", + "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name, type, is_fqdn" + }, + "get_subscription_deployment_locations" : { + "sync": { + "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_geo_regions" : { + "sync": { + "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" + }, + "list_site_identifiers_assigned_to_host_name" : { + "sync": { + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name_identifier" + }, + "list_premier_add_on_offers" : { + "sync": { + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", + "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_skus" : { + "sync": { + "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", + "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "verify_hosting_environment_vnet" : { + "sync": { + "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_09_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_09_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "parameters" + }, + "move" : { + "sync": { + "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + }, + "validate" : { + "sync": { + "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_09_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_09_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, validate_request" + }, + "validate_move" : { + "sync": { + "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + } } - }, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}" + } } \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_version.py new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_web_site_management_client.py index 349db70b7430..09ba642392bf 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_web_site_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import WebSiteManagementClientConfiguration from .operations import AppServiceCertificateOrdersOperations @@ -127,6 +128,24 @@ def __init__( self.resource_health_metadata = ResourceHealthMetadataOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_configuration.py index 43ef6707eb52..405db7f4b28b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class WebSiteManagementClientConfiguration(Configuration): """Configuration for WebSiteManagementClient. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py index d4a0aa96e900..1c43b420d215 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -124,6 +125,23 @@ def __init__( self.resource_health_metadata = ResourceHealthMetadataOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_certificate_orders_operations.py index 6e39e565b9c5..4de64a6cce7a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_certificate_orders_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -162,7 +162,7 @@ async def validate_purchase_information( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -293,7 +293,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) @@ -347,7 +347,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -381,8 +381,8 @@ async def begin_create_or_update( :type certificate_distinguished_name: ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceCertificateOrder or the result of cls(response) @@ -485,7 +485,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -551,7 +551,7 @@ async def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -632,7 +632,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -697,7 +697,7 @@ async def get_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) @@ -753,7 +753,7 @@ async def _create_or_update_certificate_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -790,8 +790,8 @@ async def begin_create_or_update_certificate( :type key_vault_certificate: ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceCertificateResource or the result of cls(response) @@ -900,7 +900,7 @@ async def delete_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -970,7 +970,7 @@ async def update_certificate( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1043,7 +1043,7 @@ async def reissue( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1109,7 +1109,7 @@ async def renew( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1167,7 +1167,7 @@ async def resend_email( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1233,7 +1233,7 @@ async def resend_request_emails( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1299,7 +1299,7 @@ async def retrieve_site_seal( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteSeal', pipeline_response) @@ -1360,7 +1360,7 @@ async def verify_domain_ownership( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1418,7 +1418,7 @@ async def retrieve_certificate_actions( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateOrderAction]', pipeline_response) @@ -1479,7 +1479,7 @@ async def retrieve_certificate_email_history( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateEmail]', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_environments_operations.py index cf98ca3dcaf1..5d413f693db8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_environments_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -174,7 +174,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -235,7 +235,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) @@ -289,7 +289,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -326,8 +326,8 @@ async def begin_create_or_update( :type hosting_environment_envelope: ~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) @@ -420,7 +420,7 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -448,8 +448,8 @@ async def begin_delete( :type force_delete: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -557,7 +557,7 @@ async def update( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -641,7 +641,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -702,7 +702,7 @@ async def get_vip_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressResponse', pipeline_response) @@ -756,7 +756,7 @@ async def _change_vnet_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -790,8 +790,8 @@ async def begin_change_vnet( :type vnet_info: ~azure.mgmt.web.v2020_09_01.models.VirtualNetworkProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -853,7 +853,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -957,7 +957,7 @@ async def list_diagnostics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', pipeline_response) @@ -1022,7 +1022,7 @@ async def get_diagnostics_item( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostingEnvironmentDiagnostics', pipeline_response) @@ -1100,7 +1100,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1177,7 +1177,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1238,7 +1238,7 @@ async def get_multi_role_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -1292,7 +1292,7 @@ async def _create_or_update_multi_role_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1326,8 +1326,8 @@ async def begin_create_or_update_multi_role_pool( :type multi_role_pool_envelope: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -1438,7 +1438,7 @@ async def update_multi_role_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1524,7 +1524,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1601,7 +1601,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1678,7 +1678,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1755,7 +1755,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1816,7 +1816,7 @@ async def list_operations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Operation]', pipeline_response) @@ -1894,7 +1894,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1955,7 +1955,7 @@ async def reboot( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2000,7 +2000,7 @@ async def _resume_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2031,8 +2031,8 @@ async def begin_resume( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2086,7 +2086,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2205,7 +2205,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2287,7 +2287,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2335,7 +2335,7 @@ async def _suspend_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2366,8 +2366,8 @@ async def begin_suspend( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2421,7 +2421,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2548,7 +2548,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2625,7 +2625,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2690,7 +2690,7 @@ async def get_worker_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -2746,7 +2746,7 @@ async def _create_or_update_worker_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2783,8 +2783,8 @@ async def begin_create_or_update_worker_pool( :type worker_pool_envelope: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -2901,7 +2901,7 @@ async def update_worker_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2991,7 +2991,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3072,7 +3072,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3153,7 +3153,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3234,7 +3234,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_plans_operations.py index 72cfe2c63901..87e98356005b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_plans_operations.py @@ -108,7 +108,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -181,7 +181,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -242,7 +242,7 @@ async def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -298,7 +298,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -332,8 +332,8 @@ async def begin_create_or_update( :type app_service_plan: ~azure.mgmt.web.v2020_09_01.models.AppServicePlan :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AppServicePlan or the result of cls(response) @@ -436,7 +436,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -502,7 +502,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -567,7 +567,7 @@ async def list_capabilities( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Capability]', pipeline_response) @@ -636,7 +636,7 @@ async def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -705,7 +705,7 @@ async def delete_hybrid_connection( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -771,7 +771,7 @@ async def list_hybrid_connection_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -856,7 +856,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -917,7 +917,7 @@ async def get_hybrid_connection_plan_limit( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionLimits', pipeline_response) @@ -994,7 +994,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1062,7 +1062,7 @@ async def restart_web_apps( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1154,7 +1154,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1215,7 +1215,7 @@ async def get_server_farm_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -1298,7 +1298,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1359,7 +1359,7 @@ async def list_vnets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -1424,7 +1424,7 @@ async def get_vnet_from_server_farm( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1495,7 +1495,7 @@ async def get_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1572,7 +1572,7 @@ async def update_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1638,7 +1638,7 @@ async def list_routes_for_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetRoute]', pipeline_response) @@ -1707,7 +1707,7 @@ async def get_route_for_vnet( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1786,7 +1786,7 @@ async def create_or_update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1857,7 +1857,7 @@ async def delete_vnet_route( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1931,7 +1931,7 @@ async def update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1998,7 +1998,7 @@ async def reboot_worker( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificate_registration_provider_operations.py index 590540ed7050..529362337ddf 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificate_registration_provider_operations.py @@ -96,7 +96,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificates_operations.py index 5026824326f7..547f880a6c6c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificates_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -233,7 +233,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -302,7 +302,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -363,7 +363,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -429,7 +429,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_deleted_web_apps_operations.py index c64b4fc69963..73589a7a9c34 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_deleted_web_apps_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -233,7 +233,7 @@ async def get_deleted_web_app_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeletedSite', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_diagnostics_operations.py index dd7ac8f0e1e4..d0ff65aa0c96 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_diagnostics_operations.py @@ -108,7 +108,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -188,7 +188,7 @@ async def get_hosting_environment_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -265,7 +265,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -345,7 +345,7 @@ async def get_site_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -422,7 +422,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -487,7 +487,7 @@ async def get_site_diagnostic_category( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -568,7 +568,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -637,7 +637,7 @@ async def get_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -721,7 +721,7 @@ async def execute_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -802,7 +802,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -871,7 +871,7 @@ async def get_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -955,7 +955,7 @@ async def execute_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) @@ -1036,7 +1036,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1120,7 +1120,7 @@ async def get_site_detector_response_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -1201,7 +1201,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1270,7 +1270,7 @@ async def get_site_diagnostic_category_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -1355,7 +1355,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1428,7 +1428,7 @@ async def get_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -1516,7 +1516,7 @@ async def execute_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -1601,7 +1601,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1674,7 +1674,7 @@ async def get_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -1762,7 +1762,7 @@ async def execute_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domain_registration_provider_operations.py index 8572356db15d..7a3a1a323c4e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domain_registration_provider_operations.py @@ -96,7 +96,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py index f7fae46156e3..cec30f857da0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py @@ -93,7 +93,7 @@ async def check_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainAvailabilityCheckResult', pipeline_response) @@ -162,7 +162,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -215,7 +215,7 @@ async def get_control_center_sso_request( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainControlCenterSsoRequest', pipeline_response) @@ -295,7 +295,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -368,7 +368,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -429,7 +429,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Domain', pipeline_response) @@ -483,7 +483,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -517,8 +517,8 @@ async def begin_create_or_update( :type domain: ~azure.mgmt.web.v2020_09_01.models.Domain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Domain or the result of cls(response) @@ -627,7 +627,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -693,7 +693,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -774,7 +774,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -839,7 +839,7 @@ async def get_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -858,10 +858,10 @@ async def create_or_update_ownership_identifier( domain_ownership_identifier: "_models.DomainOwnershipIdentifier", **kwargs ) -> "_models.DomainOwnershipIdentifier": - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -913,7 +913,7 @@ async def create_or_update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -978,7 +978,7 @@ async def delete_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -994,10 +994,10 @@ async def update_ownership_identifier( domain_ownership_identifier: "_models.DomainOwnershipIdentifier", **kwargs ) -> "_models.DomainOwnershipIdentifier": - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1049,7 +1049,7 @@ async def update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -1110,7 +1110,7 @@ async def renew( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_provider_operations.py index 82d217246b84..1cb89e6ab963 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_provider_operations.py @@ -100,7 +100,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -166,7 +166,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_recommendations_operations.py index 31dcf46197d8..2c42c20d6c13 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_recommendations_operations.py @@ -112,7 +112,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -165,7 +165,7 @@ async def reset_all_filters( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -220,7 +220,7 @@ async def disable_recommendation_for_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -307,7 +307,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -396,7 +396,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -461,7 +461,7 @@ async def disable_all_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -523,7 +523,7 @@ async def reset_all_filters_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -597,7 +597,7 @@ async def get_rule_details_by_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -666,7 +666,7 @@ async def disable_recommendation_for_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -753,7 +753,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -842,7 +842,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -903,7 +903,7 @@ async def disable_all_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -961,7 +961,7 @@ async def reset_all_filters_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1035,7 +1035,7 @@ async def get_rule_details_by_web_app( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -1100,7 +1100,7 @@ async def disable_recommendation_for_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_resource_health_metadata_operations.py index dfea6e1d22b0..20552e3cf5a2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_resource_health_metadata_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -173,7 +173,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -251,7 +251,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -312,7 +312,7 @@ async def get_by_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) @@ -394,7 +394,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -459,7 +459,7 @@ async def get_by_site_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_static_sites_operations.py index 4a6fccf9f856..195010c33824 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_static_sites_operations.py @@ -96,7 +96,7 @@ async def preview_workflow( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSitesWorkflowPreview', pipeline_response) @@ -165,7 +165,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -238,7 +238,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -299,7 +299,7 @@ async def get_static_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) @@ -369,7 +369,7 @@ async def create_or_update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -434,7 +434,7 @@ async def delete_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -501,7 +501,7 @@ async def update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -586,7 +586,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -655,7 +655,7 @@ async def delete_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -730,7 +730,7 @@ async def update_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserARMResource', pipeline_response) @@ -807,7 +807,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -872,7 +872,7 @@ async def get_static_site_build( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteBuildARMResource', pipeline_response) @@ -937,7 +937,7 @@ async def delete_static_site_build( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1007,7 +1007,7 @@ async def create_or_update_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1092,7 +1092,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1157,7 +1157,7 @@ async def list_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1230,7 +1230,7 @@ async def create_or_update_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1303,7 +1303,7 @@ async def create_user_roles_invitation_link( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', pipeline_response) @@ -1380,7 +1380,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1446,7 +1446,7 @@ async def create_or_update_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1515,7 +1515,7 @@ async def delete_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1577,7 +1577,7 @@ async def validate_custom_domain_can_be_added_to_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1635,7 +1635,7 @@ async def detach_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1709,7 +1709,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1770,7 +1770,7 @@ async def list_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1835,7 +1835,7 @@ async def list_static_site_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1904,7 +1904,7 @@ async def reset_static_site_api_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_top_level_domains_operations.py index 94e084ef3912..5e0ab79700b5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_top_level_domains_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -156,7 +156,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TopLevelDomain', pipeline_response) @@ -240,7 +240,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_apps_operations.py index fda74b1b16cc..ab5faa6b6e0d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_apps_operations.py @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -180,7 +180,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -241,7 +241,7 @@ async def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -297,7 +297,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -333,8 +333,8 @@ async def begin_create_or_update( :type site_envelope: ~azure.mgmt.web.v2020_09_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) @@ -448,7 +448,7 @@ async def delete( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -516,7 +516,7 @@ async def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -586,7 +586,7 @@ async def analyze_custom_hostname( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -655,7 +655,7 @@ async def apply_slot_config_to_production( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -722,7 +722,7 @@ async def backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -799,7 +799,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -864,7 +864,7 @@ async def get_backup_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -929,7 +929,7 @@ async def delete_backup( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1001,7 +1001,7 @@ async def list_backup_status_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -1057,7 +1057,7 @@ async def _restore_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1087,8 +1087,8 @@ async def begin_restore( :type request: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -1191,7 +1191,7 @@ async def get_basic_publishing_credentials_policies( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', pipeline_response) @@ -1252,7 +1252,7 @@ async def get_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1321,7 +1321,7 @@ async def update_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1382,7 +1382,7 @@ async def get_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1451,7 +1451,7 @@ async def update_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1528,7 +1528,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1597,7 +1597,7 @@ async def update_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1658,7 +1658,7 @@ async def list_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1727,7 +1727,7 @@ async def update_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1788,7 +1788,7 @@ async def get_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1858,7 +1858,7 @@ async def update_auth_settings_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -1919,7 +1919,7 @@ async def get_auth_settings_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -1988,7 +1988,7 @@ async def update_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -2049,7 +2049,7 @@ async def list_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -2118,7 +2118,7 @@ async def update_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2179,7 +2179,7 @@ async def delete_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2237,7 +2237,7 @@ async def get_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2306,7 +2306,7 @@ async def update_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2367,7 +2367,7 @@ async def list_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2428,7 +2428,7 @@ async def get_diagnostic_logs_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2498,7 +2498,7 @@ async def update_diagnostic_logs_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2567,7 +2567,7 @@ async def update_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2628,7 +2628,7 @@ async def list_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2676,7 +2676,7 @@ async def _list_publishing_credentials_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -2703,8 +2703,8 @@ async def begin_list_publishing_credentials( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) @@ -2814,7 +2814,7 @@ async def update_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2875,7 +2875,7 @@ async def list_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2937,7 +2937,7 @@ async def list_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3007,7 +3007,7 @@ async def update_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3069,7 +3069,7 @@ async def get_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3138,7 +3138,7 @@ async def create_or_update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3207,7 +3207,7 @@ async def update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3285,7 +3285,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3350,7 +3350,7 @@ async def get_configuration_snapshot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3415,7 +3415,7 @@ async def recover_site_configuration_snapshot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3613,7 +3613,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3678,7 +3678,7 @@ async def get_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -3745,7 +3745,7 @@ async def delete_continuous_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3807,7 +3807,7 @@ async def start_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3869,7 +3869,7 @@ async def stop_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3943,7 +3943,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4008,7 +4008,7 @@ async def get_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4081,7 +4081,7 @@ async def create_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4146,7 +4146,7 @@ async def delete_deployment( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4209,7 +4209,7 @@ async def list_deployment_log( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4280,7 +4280,7 @@ async def discover_backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -4357,7 +4357,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4422,7 +4422,7 @@ async def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4496,7 +4496,7 @@ async def create_or_update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4561,7 +4561,7 @@ async def delete_domain_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4632,7 +4632,7 @@ async def update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4693,7 +4693,7 @@ async def get_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -4747,7 +4747,7 @@ async def _create_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -4779,8 +4779,8 @@ async def begin_create_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2020_09_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -4883,7 +4883,7 @@ async def get_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -4962,7 +4962,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5023,7 +5023,7 @@ async def get_functions_admin_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -5088,7 +5088,7 @@ async def get_function( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -5146,7 +5146,7 @@ async def _create_function_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -5179,8 +5179,8 @@ async def begin_create_function( :type function_envelope: ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -5289,7 +5289,7 @@ async def delete_function( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5363,7 +5363,7 @@ async def create_or_update_function_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5436,7 +5436,7 @@ async def delete_function_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5498,7 +5498,7 @@ async def list_function_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -5563,7 +5563,7 @@ async def list_function_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -5624,7 +5624,7 @@ async def list_host_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -5685,7 +5685,7 @@ async def list_sync_status( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5743,7 +5743,7 @@ async def sync_functions( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5817,7 +5817,7 @@ async def create_or_update_host_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5890,7 +5890,7 @@ async def delete_host_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5964,7 +5964,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6029,7 +6029,7 @@ async def get_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6103,7 +6103,7 @@ async def create_or_update_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6168,7 +6168,7 @@ async def delete_host_name_binding( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6234,7 +6234,7 @@ async def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6311,7 +6311,7 @@ async def create_or_update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6380,7 +6380,7 @@ async def delete_hybrid_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6454,7 +6454,7 @@ async def update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6515,7 +6515,7 @@ async def list_hybrid_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6577,7 +6577,7 @@ async def list_relay_service_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6642,7 +6642,7 @@ async def get_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6716,7 +6716,7 @@ async def create_or_update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6781,7 +6781,7 @@ async def delete_relay_service_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6852,7 +6852,7 @@ async def update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6929,7 +6929,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6994,7 +6994,7 @@ async def get_instance_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -7059,7 +7059,7 @@ async def get_instance_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -7115,7 +7115,7 @@ async def _create_instance_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7150,8 +7150,8 @@ async def begin_create_instance_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2020_09_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -7260,7 +7260,7 @@ async def get_instance_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7345,7 +7345,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7416,7 +7416,7 @@ async def get_instance_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7489,7 +7489,7 @@ async def delete_instance_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -7557,7 +7557,7 @@ async def get_instance_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7646,7 +7646,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7721,7 +7721,7 @@ async def get_instance_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7810,7 +7810,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7871,7 +7871,7 @@ async def is_cloneable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -7948,7 +7948,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8009,7 +8009,7 @@ async def list_sync_function_triggers( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -8065,7 +8065,7 @@ async def _migrate_storage_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) @@ -8098,8 +8098,8 @@ async def begin_migrate_storage( :type migration_options: ~azure.mgmt.web.v2020_09_01.models.StorageMigrationOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either StorageMigrationResponse or the result of cls(response) @@ -8196,7 +8196,7 @@ async def _migrate_my_sql_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Operation', pipeline_response) @@ -8226,8 +8226,8 @@ async def begin_migrate_my_sql( :type migration_request_envelope: ~azure.mgmt.web.v2020_09_01.models.MigrateMySqlRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Operation or the result of cls(response) @@ -8331,7 +8331,7 @@ async def get_migrate_my_sql_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -8392,7 +8392,7 @@ async def get_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8465,7 +8465,7 @@ async def create_or_update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8526,7 +8526,7 @@ async def delete_swift_virtual_network( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -8596,7 +8596,7 @@ async def update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8661,7 +8661,7 @@ async def list_network_features( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -8729,7 +8729,7 @@ async def get_network_trace_operation( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8809,7 +8809,7 @@ async def start_web_site_network_trace( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -8866,7 +8866,7 @@ async def _start_web_site_network_trace_operation_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8906,8 +8906,8 @@ async def begin_start_web_site_network_trace_operation( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -9012,7 +9012,7 @@ async def stop_web_site_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9075,7 +9075,7 @@ async def get_network_traces( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9141,7 +9141,7 @@ async def get_network_trace_operation_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -9211,7 +9211,7 @@ async def get_network_traces_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9273,7 +9273,7 @@ async def generate_new_site_publishing_password( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9354,7 +9354,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9415,7 +9415,7 @@ async def get_site_php_error_log_flag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -9476,7 +9476,7 @@ async def list_premier_add_ons( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9541,7 +9541,7 @@ async def get_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9614,7 +9614,7 @@ async def add_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9679,7 +9679,7 @@ async def delete_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9749,7 +9749,7 @@ async def update_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9811,7 +9811,7 @@ async def get_private_access( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -9881,7 +9881,7 @@ async def put_private_access_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -9959,7 +9959,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10025,7 +10025,7 @@ async def get_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10093,7 +10093,7 @@ async def delete_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10156,7 +10156,7 @@ async def get_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10240,7 +10240,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10310,7 +10310,7 @@ async def get_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10394,7 +10394,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10471,7 +10471,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10536,7 +10536,7 @@ async def get_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10610,7 +10610,7 @@ async def create_or_update_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10675,7 +10675,7 @@ async def delete_public_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10742,7 +10742,7 @@ async def list_publishing_profile_xml_with_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -10804,7 +10804,7 @@ async def reset_production_slot_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10874,7 +10874,7 @@ async def restart( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10925,7 +10925,7 @@ async def _restore_from_backup_blob_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10952,8 +10952,8 @@ async def begin_restore_from_backup_blob( :type request: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11046,7 +11046,7 @@ async def _restore_from_deleted_app_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11073,8 +11073,8 @@ async def begin_restore_from_deleted_app( :type restore_request: ~azure.mgmt.web.v2020_09_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11167,7 +11167,7 @@ async def _restore_snapshot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11195,8 +11195,8 @@ async def begin_restore_snapshot( :type restore_request: ~azure.mgmt.web.v2020_09_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11312,7 +11312,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11377,7 +11377,7 @@ async def get_site_extension( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11429,7 +11429,7 @@ async def _install_site_extension_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11464,8 +11464,8 @@ async def begin_install_site_extension( :type site_extension_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -11573,7 +11573,7 @@ async def delete_site_extension( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11624,7 +11624,7 @@ async def _copy_production_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11652,8 +11652,8 @@ async def begin_copy_production_slot( :type copy_slot_entity: ~azure.mgmt.web.v2020_09_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -11769,7 +11769,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11834,7 +11834,7 @@ async def get_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11892,7 +11892,7 @@ async def _create_or_update_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -11932,8 +11932,8 @@ async def begin_create_or_update_slot( :type site_envelope: ~azure.mgmt.web.v2020_09_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) @@ -12055,7 +12055,7 @@ async def delete_slot( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12128,7 +12128,7 @@ async def update_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -12202,7 +12202,7 @@ async def analyze_custom_hostname_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -12276,7 +12276,7 @@ async def apply_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12348,7 +12348,7 @@ async def backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12430,7 +12430,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12500,7 +12500,7 @@ async def get_backup_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12570,7 +12570,7 @@ async def delete_backup_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12646,7 +12646,7 @@ async def list_backup_status_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12704,7 +12704,7 @@ async def _restore_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12738,8 +12738,8 @@ async def begin_restore_slot( :type request: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -12864,7 +12864,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12938,7 +12938,7 @@ async def update_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13004,7 +13004,7 @@ async def list_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13077,7 +13077,7 @@ async def update_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13143,7 +13143,7 @@ async def get_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13217,7 +13217,7 @@ async def update_auth_settings_v2_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -13283,7 +13283,7 @@ async def get_auth_settings_v2_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -13357,7 +13357,7 @@ async def update_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13423,7 +13423,7 @@ async def list_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13497,7 +13497,7 @@ async def update_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13563,7 +13563,7 @@ async def delete_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -13626,7 +13626,7 @@ async def get_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13700,7 +13700,7 @@ async def update_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13766,7 +13766,7 @@ async def list_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13832,7 +13832,7 @@ async def get_diagnostic_logs_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13907,7 +13907,7 @@ async def update_diagnostic_logs_config_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -13981,7 +13981,7 @@ async def update_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -14047,7 +14047,7 @@ async def list_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -14097,7 +14097,7 @@ async def _list_publishing_credentials_slot_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -14128,8 +14128,8 @@ async def begin_list_publishing_credentials_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) @@ -14245,7 +14245,7 @@ async def update_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14310,7 +14310,7 @@ async def list_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14377,7 +14377,7 @@ async def get_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14451,7 +14451,7 @@ async def create_or_update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14525,7 +14525,7 @@ async def update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14608,7 +14608,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14678,7 +14678,7 @@ async def get_configuration_snapshot_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14748,7 +14748,7 @@ async def recover_site_configuration_snapshot_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -14959,7 +14959,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15029,7 +15029,7 @@ async def get_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -15101,7 +15101,7 @@ async def delete_continuous_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15168,7 +15168,7 @@ async def start_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15235,7 +15235,7 @@ async def stop_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15314,7 +15314,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15384,7 +15384,7 @@ async def get_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15462,7 +15462,7 @@ async def create_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15532,7 +15532,7 @@ async def delete_deployment_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15600,7 +15600,7 @@ async def list_deployment_log_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15676,7 +15676,7 @@ async def discover_backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -15758,7 +15758,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15828,7 +15828,7 @@ async def get_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15907,7 +15907,7 @@ async def create_or_update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -15977,7 +15977,7 @@ async def delete_domain_ownership_identifier_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16053,7 +16053,7 @@ async def update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -16118,7 +16118,7 @@ async def get_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -16174,7 +16174,7 @@ async def _create_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16209,8 +16209,8 @@ async def begin_create_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2020_09_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -16319,7 +16319,7 @@ async def get_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16402,7 +16402,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16467,7 +16467,7 @@ async def get_functions_admin_token_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -16536,7 +16536,7 @@ async def get_instance_function_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16596,7 +16596,7 @@ async def _create_instance_function_slot_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -16632,8 +16632,8 @@ async def begin_create_instance_function_slot( :type function_envelope: ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -16748,7 +16748,7 @@ async def delete_instance_function_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16826,7 +16826,7 @@ async def create_or_update_function_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -16903,7 +16903,7 @@ async def delete_function_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16969,7 +16969,7 @@ async def list_function_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -17038,7 +17038,7 @@ async def list_function_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -17103,7 +17103,7 @@ async def list_host_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -17168,7 +17168,7 @@ async def list_sync_status_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17230,7 +17230,7 @@ async def sync_functions_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17308,7 +17308,7 @@ async def create_or_update_host_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -17385,7 +17385,7 @@ async def delete_host_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17464,7 +17464,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17534,7 +17534,7 @@ async def get_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17613,7 +17613,7 @@ async def create_or_update_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17683,7 +17683,7 @@ async def delete_host_name_binding_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17753,7 +17753,7 @@ async def get_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17834,7 +17834,7 @@ async def create_or_update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -17907,7 +17907,7 @@ async def delete_hybrid_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17985,7 +17985,7 @@ async def update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18050,7 +18050,7 @@ async def list_hybrid_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18117,7 +18117,7 @@ async def list_relay_service_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18187,7 +18187,7 @@ async def get_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18266,7 +18266,7 @@ async def create_or_update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18336,7 +18336,7 @@ async def delete_relay_service_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18412,7 +18412,7 @@ async def update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18494,7 +18494,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -18564,7 +18564,7 @@ async def get_instance_info_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -18633,7 +18633,7 @@ async def get_instance_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -18691,7 +18691,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -18729,8 +18729,8 @@ async def begin_create_instance_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2020_09_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) @@ -18845,7 +18845,7 @@ async def get_instance_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -18935,7 +18935,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19011,7 +19011,7 @@ async def get_instance_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19089,7 +19089,7 @@ async def delete_instance_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -19162,7 +19162,7 @@ async def get_instance_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19256,7 +19256,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19336,7 +19336,7 @@ async def get_instance_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19430,7 +19430,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19496,7 +19496,7 @@ async def is_cloneable_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -19578,7 +19578,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19643,7 +19643,7 @@ async def list_sync_function_triggers_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -19709,7 +19709,7 @@ async def get_migrate_my_sql_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -19775,7 +19775,7 @@ async def get_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19853,7 +19853,7 @@ async def create_or_update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -19919,7 +19919,7 @@ async def delete_swift_virtual_network_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -19994,7 +19994,7 @@ async def update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -20064,7 +20064,7 @@ async def list_network_features_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -20137,7 +20137,7 @@ async def get_network_trace_operation_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20221,7 +20221,7 @@ async def start_web_site_network_trace_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -20280,7 +20280,7 @@ async def _start_web_site_network_trace_operation_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20323,8 +20323,8 @@ async def begin_start_web_site_network_trace_operation_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -20435,7 +20435,7 @@ async def stop_web_site_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20503,7 +20503,7 @@ async def get_network_traces_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20574,7 +20574,7 @@ async def get_network_trace_operation_slot_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20649,7 +20649,7 @@ async def get_network_traces_slot_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20716,7 +20716,7 @@ async def generate_new_site_publishing_password_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20801,7 +20801,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -20866,7 +20866,7 @@ async def get_site_php_error_log_flag_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -20932,7 +20932,7 @@ async def list_premier_add_ons_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21002,7 +21002,7 @@ async def get_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21080,7 +21080,7 @@ async def add_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21150,7 +21150,7 @@ async def delete_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -21225,7 +21225,7 @@ async def update_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21291,7 +21291,7 @@ async def get_private_access_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21365,7 +21365,7 @@ async def put_private_access_vnet_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21430,7 +21430,7 @@ async def get_private_endpoint_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) @@ -21486,7 +21486,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21523,8 +21523,8 @@ async def begin_approve_or_reject_private_endpoint_connection( :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_09_01.models.PrivateLinkConnectionApprovalRequestResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnectionResource or the result of cls(response) @@ -21618,7 +21618,7 @@ async def _delete_private_endpoint_connection_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21655,8 +21655,8 @@ async def begin_delete_private_endpoint_connection( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either object or the result of cls(response) @@ -21760,7 +21760,7 @@ async def get_private_link_resources( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) @@ -21843,7 +21843,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21914,7 +21914,7 @@ async def get_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -21987,7 +21987,7 @@ async def delete_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22055,7 +22055,7 @@ async def get_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22144,7 +22144,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22219,7 +22219,7 @@ async def get_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22308,7 +22308,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22390,7 +22390,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22460,7 +22460,7 @@ async def get_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22539,7 +22539,7 @@ async def create_or_update_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22609,7 +22609,7 @@ async def delete_public_certificate_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22681,7 +22681,7 @@ async def list_publishing_profile_xml_with_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -22748,7 +22748,7 @@ async def reset_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22823,7 +22823,7 @@ async def restart_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22876,7 +22876,7 @@ async def _restore_from_backup_blob_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22907,8 +22907,8 @@ async def begin_restore_from_backup_blob_slot( :type request: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23005,7 +23005,7 @@ async def _restore_from_deleted_app_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23035,8 +23035,8 @@ async def begin_restore_from_deleted_app_slot( :type restore_request: ~azure.mgmt.web.v2020_09_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23133,7 +23133,7 @@ async def _restore_snapshot_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23164,8 +23164,8 @@ async def begin_restore_snapshot_slot( :type restore_request: ~azure.mgmt.web.v2020_09_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23288,7 +23288,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23358,7 +23358,7 @@ async def get_site_extension_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23412,7 +23412,7 @@ async def _install_site_extension_slot_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23451,8 +23451,8 @@ async def begin_install_site_extension_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -23567,7 +23567,7 @@ async def delete_site_extension_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23620,7 +23620,7 @@ async def _copy_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23652,8 +23652,8 @@ async def begin_copy_slot( :type copy_slot_entity: ~azure.mgmt.web.v2020_09_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23787,7 +23787,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23843,7 +23843,7 @@ async def _swap_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23874,8 +23874,8 @@ async def begin_swap_slot( :type slot_swap_entity: ~azure.mgmt.web.v2020_09_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -23997,7 +23997,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24078,7 +24078,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24144,7 +24144,7 @@ async def get_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24207,7 +24207,7 @@ async def _create_or_update_source_control_slot_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24248,8 +24248,8 @@ async def begin_create_or_update_source_control_slot( :type site_source_control: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) @@ -24359,7 +24359,7 @@ async def delete_source_control_slot( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24430,7 +24430,7 @@ async def update_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24503,7 +24503,7 @@ async def start_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24559,7 +24559,7 @@ async def _start_network_trace_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24602,8 +24602,8 @@ async def begin_start_network_trace_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -24715,7 +24715,7 @@ async def stop_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24777,7 +24777,7 @@ async def stop_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24839,7 +24839,7 @@ async def sync_repository_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24901,7 +24901,7 @@ async def sync_function_triggers_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24980,7 +24980,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25050,7 +25050,7 @@ async def get_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25122,7 +25122,7 @@ async def delete_triggered_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25205,7 +25205,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25280,7 +25280,7 @@ async def get_triggered_web_job_history_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25352,7 +25352,7 @@ async def run_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25439,7 +25439,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25505,7 +25505,7 @@ async def list_vnet_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -25575,7 +25575,7 @@ async def get_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25654,7 +25654,7 @@ async def create_or_update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25725,7 +25725,7 @@ async def delete_vnet_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25801,7 +25801,7 @@ async def update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -25875,7 +25875,7 @@ async def get_vnet_connection_gateway_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25959,7 +25959,7 @@ async def create_or_update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -26041,7 +26041,7 @@ async def update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -26123,7 +26123,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26193,7 +26193,7 @@ async def get_web_job_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) @@ -26281,7 +26281,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26335,7 +26335,7 @@ async def _swap_slot_with_production_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26362,8 +26362,8 @@ async def begin_swap_slot_with_production( :type slot_swap_entity: ~azure.mgmt.web.v2020_09_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -26479,7 +26479,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26556,7 +26556,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26617,7 +26617,7 @@ async def get_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26678,7 +26678,7 @@ async def _create_or_update_source_control_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26715,8 +26715,8 @@ async def begin_create_or_update_source_control( :type site_source_control: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) @@ -26819,7 +26819,7 @@ async def delete_source_control( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26885,7 +26885,7 @@ async def update_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -26953,7 +26953,7 @@ async def start( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27007,7 +27007,7 @@ async def _start_network_trace_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27047,8 +27047,8 @@ async def begin_start_network_trace( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -27153,7 +27153,7 @@ async def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27211,7 +27211,7 @@ async def stop_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27269,7 +27269,7 @@ async def sync_repository( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27327,7 +27327,7 @@ async def sync_function_triggers( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27401,7 +27401,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27466,7 +27466,7 @@ async def get_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -27533,7 +27533,7 @@ async def delete_triggered_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27611,7 +27611,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27681,7 +27681,7 @@ async def get_triggered_web_job_history( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -27748,7 +27748,7 @@ async def run_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27830,7 +27830,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27891,7 +27891,7 @@ async def list_vnet_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -27956,7 +27956,7 @@ async def get_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28030,7 +28030,7 @@ async def create_or_update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28096,7 +28096,7 @@ async def delete_vnet_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28167,7 +28167,7 @@ async def update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28236,7 +28236,7 @@ async def get_vnet_connection_gateway( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -28315,7 +28315,7 @@ async def create_or_update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28392,7 +28392,7 @@ async def update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28469,7 +28469,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28534,7 +28534,7 @@ async def get_web_job( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_site_management_client_operations.py index 5a1f074debd8..d0ce3e36dc6b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_site_management_client_operations.py @@ -72,7 +72,7 @@ async def generate_github_access_token_for_appservice_cli_async( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppserviceGithubToken', pipeline_response) @@ -121,7 +121,7 @@ async def get_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -178,7 +178,7 @@ async def update_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -243,7 +243,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -299,7 +299,7 @@ async def get_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -363,7 +363,7 @@ async def update_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -442,7 +442,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -511,7 +511,7 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceNameAvailability', pipeline_response) @@ -564,7 +564,7 @@ async def get_subscription_deployment_locations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeploymentLocations', pipeline_response) @@ -656,7 +656,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -736,7 +736,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -805,7 +805,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -858,7 +858,7 @@ async def list_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SkuInfos', pipeline_response) @@ -920,7 +920,7 @@ async def verify_hosting_environment_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetValidationFailureDetails', pipeline_response) @@ -985,7 +985,7 @@ async def move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1047,7 +1047,7 @@ async def validate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateResponse', pipeline_response) @@ -1112,7 +1112,7 @@ async def validate_move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/models/_models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/models/_models.py index a9139c30ec2f..ef23bfabbf73 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/models/_models.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/models/_models.py @@ -4399,8 +4399,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] :param support_credentials: Gets or sets whether CORS requests with credentials are allowed. @@ -6351,8 +6351,8 @@ class DomainControlCenterSsoRequest(msrest.serialization.Model): :vartype url: str :ivar post_parameter_key: Post parameter key. :vartype post_parameter_key: str - :ivar post_parameter_value: Post parameter value. Client should use 'application/x-www-form- - urlencoded' encoding for this value. + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. :vartype post_parameter_value: str """ @@ -8304,8 +8304,8 @@ class IpSecurityRestriction(msrest.serialization.Model): :param description: IP restriction rule description. :type description: str :param headers: IP restriction rule headers. - X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded- - Host#Examples). + X-Forwarded-Host + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). The matching logic is .. @@ -8316,8 +8316,8 @@ class IpSecurityRestriction(msrest.serialization.Model): but not the root domain contoso.com or multi-level foo.bar.contoso.com * Unicode host names are allowed but are converted to Punycode for matching. - X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded- - For#Examples). + X-Forwarded-For + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). The matching logic is .. @@ -12046,8 +12046,8 @@ class Site(Resource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -12274,8 +12274,8 @@ class SiteAuthSettings(ProxyOnlyResource): When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. - More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect- - discovery-1_0.html. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. :type issuer: str :param validate_issuer: Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. @@ -12370,8 +12370,8 @@ class SiteAuthSettings(ProxyOnlyResource): :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. - Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en- - us/library/dn631845.aspx. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. :type microsoft_account_o_auth_scopes: list[str] :param is_auth_from_file: "true" if the auth config settings should be read from a file, "false" otherwise. @@ -13635,8 +13635,8 @@ class SitePatchResource(ProxyOnlyResource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -17020,8 +17020,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str :param is_swift: Flag that is used to denote if this is VNET injection. :type is_swift: bool diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/models/_models_py3.py index 658df7ac9206..2484db2a55df 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/models/_models_py3.py @@ -4833,8 +4833,8 @@ def __init__( class CorsSettings(msrest.serialization.Model): """Cross-Origin Resource Sharing (CORS) settings for the app. - :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross- - origin + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] :param support_credentials: Gets or sets whether CORS requests with credentials are allowed. @@ -6971,8 +6971,8 @@ class DomainControlCenterSsoRequest(msrest.serialization.Model): :vartype url: str :ivar post_parameter_key: Post parameter key. :vartype post_parameter_key: str - :ivar post_parameter_value: Post parameter value. Client should use 'application/x-www-form- - urlencoded' encoding for this value. + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. :vartype post_parameter_value: str """ @@ -9125,8 +9125,8 @@ class IpSecurityRestriction(msrest.serialization.Model): :param description: IP restriction rule description. :type description: str :param headers: IP restriction rule headers. - X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded- - Host#Examples). + X-Forwarded-Host + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). The matching logic is .. @@ -9137,8 +9137,8 @@ class IpSecurityRestriction(msrest.serialization.Model): but not the root domain contoso.com or multi-level foo.bar.contoso.com * Unicode host names are allowed but are converted to Punycode for matching. - X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded- - For#Examples). + X-Forwarded-For + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). The matching logic is .. @@ -13277,8 +13277,8 @@ class Site(Resource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -13530,8 +13530,8 @@ class SiteAuthSettings(ProxyOnlyResource): When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. - More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect- - discovery-1_0.html. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. :type issuer: str :param validate_issuer: Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. @@ -13626,8 +13626,8 @@ class SiteAuthSettings(ProxyOnlyResource): :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. - Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en- - us/library/dn631845.aspx. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. :type microsoft_account_o_auth_scopes: list[str] :param is_auth_from_file: "true" if the auth config settings should be read from a file, "false" otherwise. @@ -15107,8 +15107,8 @@ class SitePatchResource(ProxyOnlyResource): settings. Read-only. :vartype outbound_ip_addresses: str :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound - connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read- - only. + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. :vartype possible_outbound_ip_addresses: str :param container_size: Size of the function container. :type container_size: int @@ -18831,8 +18831,8 @@ class VnetInfo(ProxyOnlyResource): :ivar resync_required: :code:`true` if a resync is required; otherwise, :code:`false`. :vartype resync_required: bool - :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma- - separated list of IP addresses. + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. :type dns_servers: str :param is_swift: Flag that is used to denote if this is VNET injection. :type is_swift: bool diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_certificate_orders_operations.py index 08b36985a546..e815f4dd50e2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_certificate_orders_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -168,7 +168,7 @@ def validate_purchase_information( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -239,7 +239,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -301,7 +301,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) @@ -356,7 +356,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -391,8 +391,8 @@ def begin_create_or_update( :type certificate_distinguished_name: ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceCertificateOrder or the result of cls(response) @@ -496,7 +496,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -563,7 +563,7 @@ def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -645,7 +645,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -711,7 +711,7 @@ def get_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) @@ -768,7 +768,7 @@ def _create_or_update_certificate_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -806,8 +806,8 @@ def begin_create_or_update_certificate( :type key_vault_certificate: ~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceCertificateResource or the result of cls(response) @@ -917,7 +917,7 @@ def delete_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -988,7 +988,7 @@ def update_certificate( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1062,7 +1062,7 @@ def reissue( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1129,7 +1129,7 @@ def renew( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1188,7 +1188,7 @@ def resend_email( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1255,7 +1255,7 @@ def resend_request_emails( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1322,7 +1322,7 @@ def retrieve_site_seal( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteSeal', pipeline_response) @@ -1384,7 +1384,7 @@ def verify_domain_ownership( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1443,7 +1443,7 @@ def retrieve_certificate_actions( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateOrderAction]', pipeline_response) @@ -1505,7 +1505,7 @@ def retrieve_certificate_email_history( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[CertificateEmail]', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_environments_operations.py index b1b0cc978095..8d8e32413f16 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_environments_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -180,7 +180,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -242,7 +242,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) @@ -297,7 +297,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -335,8 +335,8 @@ def begin_create_or_update( :type hosting_environment_envelope: ~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) @@ -430,7 +430,7 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -459,8 +459,8 @@ def begin_delete( :type force_delete: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -569,7 +569,7 @@ def update( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -654,7 +654,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -716,7 +716,7 @@ def get_vip_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AddressResponse', pipeline_response) @@ -771,7 +771,7 @@ def _change_vnet_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -806,8 +806,8 @@ def begin_change_vnet( :type vnet_info: ~azure.mgmt.web.v2020_09_01.models.VirtualNetworkProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -869,7 +869,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -974,7 +974,7 @@ def list_diagnostics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', pipeline_response) @@ -1040,7 +1040,7 @@ def get_diagnostics_item( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostingEnvironmentDiagnostics', pipeline_response) @@ -1119,7 +1119,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1197,7 +1197,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1259,7 +1259,7 @@ def get_multi_role_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -1314,7 +1314,7 @@ def _create_or_update_multi_role_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1349,8 +1349,8 @@ def begin_create_or_update_multi_role_pool( :type multi_role_pool_envelope: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -1462,7 +1462,7 @@ def update_multi_role_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1549,7 +1549,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1627,7 +1627,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1705,7 +1705,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1783,7 +1783,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1845,7 +1845,7 @@ def list_operations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Operation]', pipeline_response) @@ -1924,7 +1924,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1986,7 +1986,7 @@ def reboot( if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2032,7 +2032,7 @@ def _resume_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2064,8 +2064,8 @@ def begin_resume( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2119,7 +2119,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2239,7 +2239,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2322,7 +2322,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2371,7 +2371,7 @@ def _suspend_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2403,8 +2403,8 @@ def begin_suspend( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) @@ -2458,7 +2458,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2586,7 +2586,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2664,7 +2664,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -2730,7 +2730,7 @@ def get_worker_pool( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkerPoolResource', pipeline_response) @@ -2787,7 +2787,7 @@ def _create_or_update_worker_pool_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -2825,8 +2825,8 @@ def begin_create_or_update_worker_pool( :type worker_pool_envelope: ~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) @@ -2944,7 +2944,7 @@ def update_worker_pool( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -3035,7 +3035,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3117,7 +3117,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3199,7 +3199,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3281,7 +3281,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_plans_operations.py index b459c63c355e..e9b8f39e2cce 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_plans_operations.py @@ -113,7 +113,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -187,7 +187,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -249,7 +249,7 @@ def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -306,7 +306,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -341,8 +341,8 @@ def begin_create_or_update( :type app_service_plan: ~azure.mgmt.web.v2020_09_01.models.AppServicePlan :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AppServicePlan or the result of cls(response) @@ -446,7 +446,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -513,7 +513,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -579,7 +579,7 @@ def list_capabilities( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[Capability]', pipeline_response) @@ -649,7 +649,7 @@ def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -719,7 +719,7 @@ def delete_hybrid_connection( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -786,7 +786,7 @@ def list_hybrid_connection_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionKey', pipeline_response) @@ -872,7 +872,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -934,7 +934,7 @@ def get_hybrid_connection_plan_limit( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnectionLimits', pipeline_response) @@ -1012,7 +1012,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1081,7 +1081,7 @@ def restart_web_apps( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1174,7 +1174,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1236,7 +1236,7 @@ def get_server_farm_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -1320,7 +1320,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1382,7 +1382,7 @@ def list_vnets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -1448,7 +1448,7 @@ def get_vnet_from_server_farm( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1520,7 +1520,7 @@ def get_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1598,7 +1598,7 @@ def update_vnet_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -1665,7 +1665,7 @@ def list_routes_for_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetRoute]', pipeline_response) @@ -1735,7 +1735,7 @@ def get_route_for_vnet( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1815,7 +1815,7 @@ def create_or_update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1887,7 +1887,7 @@ def delete_vnet_route( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1962,7 +1962,7 @@ def update_vnet_route( if response.status_code not in [200, 400, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -2030,7 +2030,7 @@ def reboot_worker( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificate_registration_provider_operations.py index 8816273cd752..c2974520ee1f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificate_registration_provider_operations.py @@ -101,7 +101,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificates_operations.py index bb1f4719c1d6..d0de6a69d15d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificates_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -310,7 +310,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) @@ -372,7 +372,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -439,7 +439,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Certificate', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_deleted_web_apps_operations.py index bda5e272d417..e1948a66113f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_deleted_web_apps_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -240,7 +240,7 @@ def get_deleted_web_app_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeletedSite', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_diagnostics_operations.py index 94a410117764..2bb9b847a0d7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_diagnostics_operations.py @@ -113,7 +113,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -194,7 +194,7 @@ def get_hosting_environment_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -272,7 +272,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -353,7 +353,7 @@ def get_site_detector_response( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -431,7 +431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -497,7 +497,7 @@ def get_site_diagnostic_category( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -579,7 +579,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -649,7 +649,7 @@ def get_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -734,7 +734,7 @@ def execute_site_analysis( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -816,7 +816,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -886,7 +886,7 @@ def get_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -971,7 +971,7 @@ def execute_site_detector( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) @@ -1053,7 +1053,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1138,7 +1138,7 @@ def get_site_detector_response_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorResponse', pipeline_response) @@ -1220,7 +1220,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1290,7 +1290,7 @@ def get_site_diagnostic_category_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticCategory', pipeline_response) @@ -1376,7 +1376,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1450,7 +1450,7 @@ def get_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AnalysisDefinition', pipeline_response) @@ -1539,7 +1539,7 @@ def execute_site_analysis_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) @@ -1625,7 +1625,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1699,7 +1699,7 @@ def get_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DetectorDefinition', pipeline_response) @@ -1788,7 +1788,7 @@ def execute_site_detector_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domain_registration_provider_operations.py index 2683ac8ac526..2f92992ed858 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domain_registration_provider_operations.py @@ -101,7 +101,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domains_operations.py index f91b5c15b4c5..6fc5eead86a2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domains_operations.py @@ -98,7 +98,7 @@ def check_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainAvailabilityCheckResult', pipeline_response) @@ -168,7 +168,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -222,7 +222,7 @@ def get_control_center_sso_request( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainControlCenterSsoRequest', pipeline_response) @@ -303,7 +303,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -377,7 +377,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -439,7 +439,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Domain', pipeline_response) @@ -494,7 +494,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -529,8 +529,8 @@ def begin_create_or_update( :type domain: ~azure.mgmt.web.v2020_09_01.models.Domain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Domain or the result of cls(response) @@ -640,7 +640,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -707,7 +707,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -789,7 +789,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -855,7 +855,7 @@ def get_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -875,10 +875,10 @@ def create_or_update_ownership_identifier( **kwargs # type: Any ): # type: (...) -> "_models.DomainOwnershipIdentifier" - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -930,7 +930,7 @@ def create_or_update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -996,7 +996,7 @@ def delete_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1013,10 +1013,10 @@ def update_ownership_identifier( **kwargs # type: Any ): # type: (...) -> "_models.DomainOwnershipIdentifier" - """Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. Description for Creates an ownership identifier for a domain or updates identifier details for - an existing identifer. + an existing identifier. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1068,7 +1068,7 @@ def update_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) @@ -1130,7 +1130,7 @@ def renew( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_provider_operations.py index 715be1343359..ae884481054c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_provider_operations.py @@ -105,7 +105,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -172,7 +172,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -247,7 +247,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_recommendations_operations.py index 67588f9771f5..582e353b2387 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_recommendations_operations.py @@ -117,7 +117,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -171,7 +171,7 @@ def reset_all_filters( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -227,7 +227,7 @@ def disable_recommendation_for_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -315,7 +315,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -405,7 +405,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -471,7 +471,7 @@ def disable_all_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -534,7 +534,7 @@ def reset_all_filters_for_hosting_environment( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -609,7 +609,7 @@ def get_rule_details_by_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -679,7 +679,7 @@ def disable_recommendation_for_hosting_environment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -767,7 +767,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -857,7 +857,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -919,7 +919,7 @@ def disable_all_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -978,7 +978,7 @@ def reset_all_filters_for_web_app( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1053,7 +1053,7 @@ def get_rule_details_by_web_app( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RecommendationRule', pipeline_response) @@ -1119,7 +1119,7 @@ def disable_recommendation_for_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py index 2e812e3a18aa..7f2dcfe568bd 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -179,7 +179,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -258,7 +258,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -320,7 +320,7 @@ def get_by_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) @@ -403,7 +403,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -469,7 +469,7 @@ def get_by_site_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_static_sites_operations.py index a36a2ab7313d..c7cde31eb4b6 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_static_sites_operations.py @@ -101,7 +101,7 @@ def preview_workflow( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSitesWorkflowPreview', pipeline_response) @@ -171,7 +171,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -245,7 +245,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -307,7 +307,7 @@ def get_static_site( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) @@ -378,7 +378,7 @@ def create_or_update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -444,7 +444,7 @@ def delete_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -512,7 +512,7 @@ def update_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -598,7 +598,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -668,7 +668,7 @@ def delete_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -744,7 +744,7 @@ def update_static_site_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserARMResource', pipeline_response) @@ -822,7 +822,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -888,7 +888,7 @@ def get_static_site_build( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteBuildARMResource', pipeline_response) @@ -954,7 +954,7 @@ def delete_static_site_build( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1025,7 +1025,7 @@ def create_or_update_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1111,7 +1111,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1177,7 +1177,7 @@ def list_static_site_build_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1251,7 +1251,7 @@ def create_or_update_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1325,7 +1325,7 @@ def create_user_roles_invitation_link( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', pipeline_response) @@ -1403,7 +1403,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1470,7 +1470,7 @@ def create_or_update_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1540,7 +1540,7 @@ def delete_static_site_custom_domain( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1603,7 +1603,7 @@ def validate_custom_domain_can_be_added_to_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1662,7 +1662,7 @@ def detach_static_site( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1737,7 +1737,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1799,7 +1799,7 @@ def list_static_site_function_app_settings( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1865,7 +1865,7 @@ def list_static_site_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1935,7 +1935,7 @@ def reset_static_site_api_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_top_level_domains_operations.py index 192cb6cb501d..d69749ddc95d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_top_level_domains_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -162,7 +162,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('TopLevelDomain', pipeline_response) @@ -247,7 +247,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_apps_operations.py index 410a72c91d64..4bd8e2f2066c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_apps_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -186,7 +186,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -248,7 +248,7 @@ def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -305,7 +305,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -342,8 +342,8 @@ def begin_create_or_update( :type site_envelope: ~azure.mgmt.web.v2020_09_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Site or the result of cls(response) @@ -458,7 +458,7 @@ def delete( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -527,7 +527,7 @@ def update( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -598,7 +598,7 @@ def analyze_custom_hostname( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -668,7 +668,7 @@ def apply_slot_config_to_production( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -736,7 +736,7 @@ def backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -814,7 +814,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -880,7 +880,7 @@ def get_backup_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -946,7 +946,7 @@ def delete_backup( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1019,7 +1019,7 @@ def list_backup_status_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -1076,7 +1076,7 @@ def _restore_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1107,8 +1107,8 @@ def begin_restore( :type request: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -1212,7 +1212,7 @@ def get_basic_publishing_credentials_policies( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', pipeline_response) @@ -1274,7 +1274,7 @@ def get_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1344,7 +1344,7 @@ def update_ftp_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1406,7 +1406,7 @@ def get_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1476,7 +1476,7 @@ def update_scm_allowed( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) @@ -1554,7 +1554,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1624,7 +1624,7 @@ def update_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1686,7 +1686,7 @@ def list_application_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -1756,7 +1756,7 @@ def update_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1818,7 +1818,7 @@ def get_auth_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -1889,7 +1889,7 @@ def update_auth_settings_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -1951,7 +1951,7 @@ def get_auth_settings_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -2021,7 +2021,7 @@ def update_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -2083,7 +2083,7 @@ def list_azure_storage_accounts( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -2153,7 +2153,7 @@ def update_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2215,7 +2215,7 @@ def delete_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2274,7 +2274,7 @@ def get_backup_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -2344,7 +2344,7 @@ def update_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2406,7 +2406,7 @@ def list_connection_strings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -2468,7 +2468,7 @@ def get_diagnostic_logs_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2539,7 +2539,7 @@ def update_diagnostic_logs_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -2609,7 +2609,7 @@ def update_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2671,7 +2671,7 @@ def list_metadata( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -2720,7 +2720,7 @@ def _list_publishing_credentials_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -2748,8 +2748,8 @@ def begin_list_publishing_credentials( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either User or the result of cls(response) @@ -2860,7 +2860,7 @@ def update_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2922,7 +2922,7 @@ def list_site_push_settings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -2985,7 +2985,7 @@ def list_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3056,7 +3056,7 @@ def update_slot_configuration_names( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) @@ -3119,7 +3119,7 @@ def get_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3189,7 +3189,7 @@ def create_or_update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3259,7 +3259,7 @@ def update_configuration( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3338,7 +3338,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3404,7 +3404,7 @@ def get_configuration_snapshot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -3470,7 +3470,7 @@ def recover_site_configuration_snapshot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3671,7 +3671,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -3737,7 +3737,7 @@ def get_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -3805,7 +3805,7 @@ def delete_continuous_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3868,7 +3868,7 @@ def start_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3931,7 +3931,7 @@ def stop_continuous_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4006,7 +4006,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4072,7 +4072,7 @@ def get_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4146,7 +4146,7 @@ def create_deployment( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4212,7 +4212,7 @@ def delete_deployment( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4276,7 +4276,7 @@ def list_deployment_log( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -4348,7 +4348,7 @@ def discover_backup( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -4426,7 +4426,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -4492,7 +4492,7 @@ def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4567,7 +4567,7 @@ def create_or_update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4633,7 +4633,7 @@ def delete_domain_ownership_identifier( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4705,7 +4705,7 @@ def update_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -4767,7 +4767,7 @@ def get_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -4822,7 +4822,7 @@ def _create_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -4855,8 +4855,8 @@ def begin_create_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2020_09_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -4960,7 +4960,7 @@ def get_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -5040,7 +5040,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -5102,7 +5102,7 @@ def get_functions_admin_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -5168,7 +5168,7 @@ def get_function( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -5227,7 +5227,7 @@ def _create_function_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -5261,8 +5261,8 @@ def begin_create_function( :type function_envelope: ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -5372,7 +5372,7 @@ def delete_function( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5447,7 +5447,7 @@ def create_or_update_function_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5521,7 +5521,7 @@ def delete_function_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5584,7 +5584,7 @@ def list_function_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -5650,7 +5650,7 @@ def list_function_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -5712,7 +5712,7 @@ def list_host_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -5774,7 +5774,7 @@ def list_sync_status( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5833,7 +5833,7 @@ def sync_functions( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -5908,7 +5908,7 @@ def create_or_update_host_secret( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -5982,7 +5982,7 @@ def delete_host_secret( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6057,7 +6057,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -6123,7 +6123,7 @@ def get_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6198,7 +6198,7 @@ def create_or_update_host_name_binding( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -6264,7 +6264,7 @@ def delete_host_name_binding( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6331,7 +6331,7 @@ def get_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6409,7 +6409,7 @@ def create_or_update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6479,7 +6479,7 @@ def delete_hybrid_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6554,7 +6554,7 @@ def update_hybrid_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6616,7 +6616,7 @@ def list_hybrid_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -6679,7 +6679,7 @@ def list_relay_service_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6745,7 +6745,7 @@ def get_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6820,7 +6820,7 @@ def create_or_update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -6886,7 +6886,7 @@ def delete_relay_service_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -6958,7 +6958,7 @@ def update_relay_service_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -7036,7 +7036,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7102,7 +7102,7 @@ def get_instance_info( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -7168,7 +7168,7 @@ def get_instance_ms_deploy_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -7225,7 +7225,7 @@ def _create_instance_ms_deploy_operation_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7261,8 +7261,8 @@ def begin_create_instance_ms_deploy_operation( :type ms_deploy: ~azure.mgmt.web.v2020_09_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -7372,7 +7372,7 @@ def get_instance_ms_deploy_log( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7458,7 +7458,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7530,7 +7530,7 @@ def get_instance_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7604,7 +7604,7 @@ def delete_instance_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -7673,7 +7673,7 @@ def get_instance_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7763,7 +7763,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7839,7 +7839,7 @@ def get_instance_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -7929,7 +7929,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -7991,7 +7991,7 @@ def is_cloneable( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -8069,7 +8069,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -8131,7 +8131,7 @@ def list_sync_function_triggers( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -8188,7 +8188,7 @@ def _migrate_storage_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) @@ -8222,8 +8222,8 @@ def begin_migrate_storage( :type migration_options: ~azure.mgmt.web.v2020_09_01.models.StorageMigrationOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either StorageMigrationResponse or the result of cls(response) @@ -8321,7 +8321,7 @@ def _migrate_my_sql_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Operation', pipeline_response) @@ -8352,8 +8352,8 @@ def begin_migrate_my_sql( :type migration_request_envelope: ~azure.mgmt.web.v2020_09_01.models.MigrateMySqlRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Operation or the result of cls(response) @@ -8458,7 +8458,7 @@ def get_migrate_my_sql_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -8520,7 +8520,7 @@ def get_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8594,7 +8594,7 @@ def create_or_update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8656,7 +8656,7 @@ def delete_swift_virtual_network( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -8727,7 +8727,7 @@ def update_swift_virtual_network_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -8793,7 +8793,7 @@ def list_network_features( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -8862,7 +8862,7 @@ def get_network_trace_operation( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -8943,7 +8943,7 @@ def start_web_site_network_trace( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -9001,7 +9001,7 @@ def _start_web_site_network_trace_operation_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -9042,8 +9042,8 @@ def begin_start_web_site_network_trace_operation( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -9149,7 +9149,7 @@ def stop_web_site_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9213,7 +9213,7 @@ def get_network_traces( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9280,7 +9280,7 @@ def get_network_trace_operation_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -9351,7 +9351,7 @@ def get_network_traces_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -9414,7 +9414,7 @@ def generate_new_site_publishing_password( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9496,7 +9496,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -9558,7 +9558,7 @@ def get_site_php_error_log_flag( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -9620,7 +9620,7 @@ def list_premier_add_ons( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9686,7 +9686,7 @@ def get_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9760,7 +9760,7 @@ def add_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9826,7 +9826,7 @@ def delete_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -9897,7 +9897,7 @@ def update_premier_add_on( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -9960,7 +9960,7 @@ def get_private_access( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -10031,7 +10031,7 @@ def put_private_access_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -10110,7 +10110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10177,7 +10177,7 @@ def get_process( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10246,7 +10246,7 @@ def delete_process( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10310,7 +10310,7 @@ def get_process_dump( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10395,7 +10395,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10466,7 +10466,7 @@ def get_process_module( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -10551,7 +10551,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10629,7 +10629,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -10695,7 +10695,7 @@ def get_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10770,7 +10770,7 @@ def create_or_update_public_certificate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -10836,7 +10836,7 @@ def delete_public_certificate( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -10904,7 +10904,7 @@ def list_publishing_profile_xml_with_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -10967,7 +10967,7 @@ def reset_production_slot_config( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11038,7 +11038,7 @@ def restart( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11090,7 +11090,7 @@ def _restore_from_backup_blob_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11118,8 +11118,8 @@ def begin_restore_from_backup_blob( :type request: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11213,7 +11213,7 @@ def _restore_from_deleted_app_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11241,8 +11241,8 @@ def begin_restore_from_deleted_app( :type restore_request: ~azure.mgmt.web.v2020_09_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11336,7 +11336,7 @@ def _restore_snapshot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11365,8 +11365,8 @@ def begin_restore_snapshot( :type restore_request: ~azure.mgmt.web.v2020_09_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11483,7 +11483,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -11549,7 +11549,7 @@ def get_site_extension( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11602,7 +11602,7 @@ def _install_site_extension_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -11638,8 +11638,8 @@ def begin_install_site_extension( :type site_extension_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -11748,7 +11748,7 @@ def delete_site_extension( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11800,7 +11800,7 @@ def _copy_production_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -11829,8 +11829,8 @@ def begin_copy_production_slot( :type copy_slot_entity: ~azure.mgmt.web.v2020_09_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -11947,7 +11947,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12013,7 +12013,7 @@ def get_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -12072,7 +12072,7 @@ def _create_or_update_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -12113,8 +12113,8 @@ def begin_create_or_update_slot( :type site_envelope: ~azure.mgmt.web.v2020_09_01.models.Site :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Site or the result of cls(response) @@ -12237,7 +12237,7 @@ def delete_slot( if response.status_code not in [200, 204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12311,7 +12311,7 @@ def update_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -12386,7 +12386,7 @@ def analyze_custom_hostname_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) @@ -12461,7 +12461,7 @@ def apply_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12534,7 +12534,7 @@ def backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12617,7 +12617,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -12688,7 +12688,7 @@ def get_backup_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12759,7 +12759,7 @@ def delete_backup_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12836,7 +12836,7 @@ def list_backup_status_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupItem', pipeline_response) @@ -12895,7 +12895,7 @@ def _restore_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -12930,8 +12930,8 @@ def begin_restore_slot( :type request: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -13057,7 +13057,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -13132,7 +13132,7 @@ def update_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13199,7 +13199,7 @@ def list_application_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -13273,7 +13273,7 @@ def update_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13340,7 +13340,7 @@ def get_auth_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettings', pipeline_response) @@ -13415,7 +13415,7 @@ def update_auth_settings_v2_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -13482,7 +13482,7 @@ def get_auth_settings_v2_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) @@ -13557,7 +13557,7 @@ def update_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13624,7 +13624,7 @@ def list_azure_storage_accounts_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) @@ -13699,7 +13699,7 @@ def update_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13766,7 +13766,7 @@ def delete_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -13830,7 +13830,7 @@ def get_backup_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupRequest', pipeline_response) @@ -13905,7 +13905,7 @@ def update_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -13972,7 +13972,7 @@ def list_connection_strings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) @@ -14039,7 +14039,7 @@ def get_diagnostic_logs_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -14115,7 +14115,7 @@ def update_diagnostic_logs_config_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteLogsConfig', pipeline_response) @@ -14190,7 +14190,7 @@ def update_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -14257,7 +14257,7 @@ def list_metadata_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -14308,7 +14308,7 @@ def _list_publishing_credentials_slot_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -14340,8 +14340,8 @@ def begin_list_publishing_credentials_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either User or the result of cls(response) @@ -14458,7 +14458,7 @@ def update_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14524,7 +14524,7 @@ def list_site_push_settings_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PushSettings', pipeline_response) @@ -14592,7 +14592,7 @@ def get_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14667,7 +14667,7 @@ def create_or_update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14742,7 +14742,7 @@ def update_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14826,7 +14826,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -14897,7 +14897,7 @@ def get_configuration_snapshot_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteConfigResource', pipeline_response) @@ -14968,7 +14968,7 @@ def recover_site_configuration_snapshot_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15182,7 +15182,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15253,7 +15253,7 @@ def get_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -15326,7 +15326,7 @@ def delete_continuous_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15394,7 +15394,7 @@ def start_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15462,7 +15462,7 @@ def stop_continuous_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15542,7 +15542,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -15613,7 +15613,7 @@ def get_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15692,7 +15692,7 @@ def create_deployment_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15763,7 +15763,7 @@ def delete_deployment_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -15832,7 +15832,7 @@ def list_deployment_log_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Deployment', pipeline_response) @@ -15909,7 +15909,7 @@ def discover_backup_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RestoreRequest', pipeline_response) @@ -15992,7 +15992,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16063,7 +16063,7 @@ def get_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -16143,7 +16143,7 @@ def create_or_update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -16214,7 +16214,7 @@ def delete_domain_ownership_identifier_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -16291,7 +16291,7 @@ def update_domain_ownership_identifier_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Identifier', pipeline_response) @@ -16357,7 +16357,7 @@ def get_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -16414,7 +16414,7 @@ def _create_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16450,8 +16450,8 @@ def begin_create_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2020_09_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -16561,7 +16561,7 @@ def get_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16645,7 +16645,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -16711,7 +16711,7 @@ def get_functions_admin_token_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -16781,7 +16781,7 @@ def get_instance_function_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -16842,7 +16842,7 @@ def _create_instance_function_slot_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionEnvelope', pipeline_response) @@ -16879,8 +16879,8 @@ def begin_create_instance_function_slot( :type function_envelope: ~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) @@ -16996,7 +16996,7 @@ def delete_instance_function_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17075,7 +17075,7 @@ def create_or_update_function_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -17153,7 +17153,7 @@ def delete_function_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17220,7 +17220,7 @@ def list_function_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('StringDictionary', pipeline_response) @@ -17290,7 +17290,7 @@ def list_function_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -17356,7 +17356,7 @@ def list_host_keys_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostKeys', pipeline_response) @@ -17422,7 +17422,7 @@ def list_sync_status_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17485,7 +17485,7 @@ def sync_functions_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17564,7 +17564,7 @@ def create_or_update_host_secret_slot( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -17642,7 +17642,7 @@ def delete_host_secret_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -17722,7 +17722,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -17793,7 +17793,7 @@ def get_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17873,7 +17873,7 @@ def create_or_update_host_name_binding_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HostNameBinding', pipeline_response) @@ -17944,7 +17944,7 @@ def delete_host_name_binding_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18015,7 +18015,7 @@ def get_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18097,7 +18097,7 @@ def create_or_update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18171,7 +18171,7 @@ def delete_hybrid_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18250,7 +18250,7 @@ def update_hybrid_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18316,7 +18316,7 @@ def list_hybrid_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('HybridConnection', pipeline_response) @@ -18384,7 +18384,7 @@ def list_relay_service_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18455,7 +18455,7 @@ def get_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18535,7 +18535,7 @@ def create_or_update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18606,7 +18606,7 @@ def delete_relay_service_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -18683,7 +18683,7 @@ def update_relay_service_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) @@ -18766,7 +18766,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -18837,7 +18837,7 @@ def get_instance_info_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) @@ -18907,7 +18907,7 @@ def get_instance_ms_deploy_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MSDeployStatus', pipeline_response) @@ -18966,7 +18966,7 @@ def _create_instance_ms_deploy_operation_slot_initial( if response.status_code not in [201, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19005,8 +19005,8 @@ def begin_create_instance_ms_deploy_operation_slot( :type ms_deploy: ~azure.mgmt.web.v2020_09_01.models.MSDeploy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) @@ -19122,7 +19122,7 @@ def get_instance_ms_deploy_log_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19213,7 +19213,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19290,7 +19290,7 @@ def get_instance_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19369,7 +19369,7 @@ def delete_instance_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -19443,7 +19443,7 @@ def get_instance_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19538,7 +19538,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19619,7 +19619,7 @@ def get_instance_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -19714,7 +19714,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19781,7 +19781,7 @@ def is_cloneable_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SiteCloneability', pipeline_response) @@ -19864,7 +19864,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -19930,7 +19930,7 @@ def list_sync_function_triggers_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FunctionSecrets', pipeline_response) @@ -19997,7 +19997,7 @@ def get_migrate_my_sql_status_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) @@ -20064,7 +20064,7 @@ def get_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -20143,7 +20143,7 @@ def create_or_update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -20210,7 +20210,7 @@ def delete_swift_virtual_network_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20286,7 +20286,7 @@ def update_swift_virtual_network_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) @@ -20357,7 +20357,7 @@ def list_network_features_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -20431,7 +20431,7 @@ def get_network_trace_operation_slot( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20516,7 +20516,7 @@ def start_web_site_network_trace_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('str', pipeline_response) @@ -20576,7 +20576,7 @@ def _start_web_site_network_trace_operation_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20620,8 +20620,8 @@ def begin_start_web_site_network_trace_operation_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -20733,7 +20733,7 @@ def stop_web_site_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -20802,7 +20802,7 @@ def get_network_traces_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -20874,7 +20874,7 @@ def get_network_trace_operation_slot_v2( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -20950,7 +20950,7 @@ def get_network_traces_slot_v2( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkTrace]', pipeline_response) @@ -21018,7 +21018,7 @@ def generate_new_site_publishing_password_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -21104,7 +21104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -21170,7 +21170,7 @@ def get_site_php_error_log_flag_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) @@ -21237,7 +21237,7 @@ def list_premier_add_ons_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21308,7 +21308,7 @@ def get_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21387,7 +21387,7 @@ def add_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21458,7 +21458,7 @@ def delete_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -21534,7 +21534,7 @@ def update_premier_add_on_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PremierAddOn', pipeline_response) @@ -21601,7 +21601,7 @@ def get_private_access_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21676,7 +21676,7 @@ def put_private_access_vnet_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAccess', pipeline_response) @@ -21742,7 +21742,7 @@ def get_private_endpoint_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) @@ -21799,7 +21799,7 @@ def _approve_or_reject_private_endpoint_connection_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21837,8 +21837,8 @@ def begin_approve_or_reject_private_endpoint_connection( :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_09_01.models.PrivateLinkConnectionApprovalRequestResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnectionResource or the result of cls(response) @@ -21933,7 +21933,7 @@ def _delete_private_endpoint_connection_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -21971,8 +21971,8 @@ def begin_delete_private_endpoint_connection( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either object or the result of cls(response) @@ -22077,7 +22077,7 @@ def get_private_link_resources( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) @@ -22161,7 +22161,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22233,7 +22233,7 @@ def get_process_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22307,7 +22307,7 @@ def delete_process_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -22376,7 +22376,7 @@ def get_process_dump_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22466,7 +22466,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22542,7 +22542,7 @@ def get_process_module_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -22632,7 +22632,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22715,7 +22715,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -22786,7 +22786,7 @@ def get_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22866,7 +22866,7 @@ def create_or_update_public_certificate_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PublicCertificate', pipeline_response) @@ -22937,7 +22937,7 @@ def delete_public_certificate_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23010,7 +23010,7 @@ def list_publishing_profile_xml_with_secrets_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline) @@ -23078,7 +23078,7 @@ def reset_slot_configuration_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23154,7 +23154,7 @@ def restart_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23208,7 +23208,7 @@ def _restore_from_backup_blob_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23240,8 +23240,8 @@ def begin_restore_from_backup_blob_slot( :type request: ~azure.mgmt.web.v2020_09_01.models.RestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23339,7 +23339,7 @@ def _restore_from_deleted_app_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23370,8 +23370,8 @@ def begin_restore_from_deleted_app_slot( :type restore_request: ~azure.mgmt.web.v2020_09_01.models.DeletedAppRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23469,7 +23469,7 @@ def _restore_snapshot_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23501,8 +23501,8 @@ def begin_restore_snapshot_slot( :type restore_request: ~azure.mgmt.web.v2020_09_01.models.SnapshotRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -23626,7 +23626,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -23697,7 +23697,7 @@ def get_site_extension_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23752,7 +23752,7 @@ def _install_site_extension_slot_initial( if response.status_code not in [200, 201, 429]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -23792,8 +23792,8 @@ def begin_install_site_extension_slot( :type slot: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) @@ -23909,7 +23909,7 @@ def delete_site_extension_slot( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23963,7 +23963,7 @@ def _copy_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -23996,8 +23996,8 @@ def begin_copy_slot( :type copy_slot_entity: ~azure.mgmt.web.v2020_09_01.models.CsmCopySlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -24132,7 +24132,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24189,7 +24189,7 @@ def _swap_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24221,8 +24221,8 @@ def begin_swap_slot( :type slot_swap_entity: ~azure.mgmt.web.v2020_09_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -24345,7 +24345,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24427,7 +24427,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -24494,7 +24494,7 @@ def get_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24558,7 +24558,7 @@ def _create_or_update_source_control_slot_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24600,8 +24600,8 @@ def begin_create_or_update_source_control_slot( :type site_source_control: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) @@ -24712,7 +24712,7 @@ def delete_source_control_slot( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24784,7 +24784,7 @@ def update_source_control_slot( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24858,7 +24858,7 @@ def start_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -24915,7 +24915,7 @@ def _start_network_trace_slot_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -24959,8 +24959,8 @@ def begin_start_network_trace_slot( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -25073,7 +25073,7 @@ def stop_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25136,7 +25136,7 @@ def stop_network_trace_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25199,7 +25199,7 @@ def sync_repository_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25262,7 +25262,7 @@ def sync_function_triggers_slot( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25342,7 +25342,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25413,7 +25413,7 @@ def get_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25486,7 +25486,7 @@ def delete_triggered_web_job_slot( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25570,7 +25570,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25646,7 +25646,7 @@ def get_triggered_web_job_history_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -25719,7 +25719,7 @@ def run_triggered_web_job_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -25807,7 +25807,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -25874,7 +25874,7 @@ def list_vnet_connections_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -25945,7 +25945,7 @@ def get_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -26025,7 +26025,7 @@ def create_or_update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -26097,7 +26097,7 @@ def delete_vnet_connection_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26174,7 +26174,7 @@ def update_vnet_connection_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -26249,7 +26249,7 @@ def get_vnet_connection_gateway_slot( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -26334,7 +26334,7 @@ def create_or_update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -26417,7 +26417,7 @@ def update_vnet_connection_gateway_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -26500,7 +26500,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26571,7 +26571,7 @@ def get_web_job_slot( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) @@ -26660,7 +26660,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26715,7 +26715,7 @@ def _swap_slot_with_production_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -26743,8 +26743,8 @@ def begin_swap_slot_with_production( :type slot_swap_entity: ~azure.mgmt.web.v2020_09_01.models.CsmSlotEntity :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -26861,7 +26861,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -26939,7 +26939,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27001,7 +27001,7 @@ def get_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27063,7 +27063,7 @@ def _create_or_update_source_control_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27101,8 +27101,8 @@ def begin_create_or_update_source_control( :type site_source_control: ~azure.mgmt.web.v2020_09_01.models.SiteSourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) @@ -27206,7 +27206,7 @@ def delete_source_control( if response.status_code not in [200, 202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27273,7 +27273,7 @@ def update_source_control( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27342,7 +27342,7 @@ def start( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27397,7 +27397,7 @@ def _start_network_trace_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -27438,8 +27438,8 @@ def begin_start_network_trace( :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) @@ -27545,7 +27545,7 @@ def stop( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27604,7 +27604,7 @@ def stop_network_trace( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27663,7 +27663,7 @@ def sync_repository( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27722,7 +27722,7 @@ def sync_function_triggers( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -27797,7 +27797,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -27863,7 +27863,7 @@ def get_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -27931,7 +27931,7 @@ def delete_triggered_web_job( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28010,7 +28010,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 404]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28081,7 +28081,7 @@ def get_triggered_web_job_history( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -28149,7 +28149,7 @@ def run_triggered_web_job( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28232,7 +28232,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28294,7 +28294,7 @@ def list_vnet_connections( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[VnetInfo]', pipeline_response) @@ -28360,7 +28360,7 @@ def get_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28435,7 +28435,7 @@ def create_or_update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28502,7 +28502,7 @@ def delete_vnet_connection( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -28574,7 +28574,7 @@ def update_vnet_connection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetInfo', pipeline_response) @@ -28644,7 +28644,7 @@ def get_vnet_connection_gateway( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -28724,7 +28724,7 @@ def create_or_update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28802,7 +28802,7 @@ def update_vnet_connection_gateway( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetGateway', pipeline_response) @@ -28880,7 +28880,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -28946,7 +28946,7 @@ def get_web_job( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WebJob', pipeline_response) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_site_management_client_operations.py index af2e33071d62..0d949de65b46 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_site_management_client_operations.py @@ -77,7 +77,7 @@ def generate_github_access_token_for_appservice_cli_async( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AppserviceGithubToken', pipeline_response) @@ -127,7 +127,7 @@ def get_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -185,7 +185,7 @@ def update_publishing_user( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('User', pipeline_response) @@ -251,7 +251,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -308,7 +308,7 @@ def get_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -373,7 +373,7 @@ def update_source_control( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SourceControl', pipeline_response) @@ -453,7 +453,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -523,7 +523,7 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourceNameAvailability', pipeline_response) @@ -577,7 +577,7 @@ def get_subscription_deployment_locations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DeploymentLocations', pipeline_response) @@ -670,7 +670,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -751,7 +751,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -821,7 +821,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -875,7 +875,7 @@ def list_skus( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SkuInfos', pipeline_response) @@ -938,7 +938,7 @@ def verify_hosting_environment_vnet( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VnetValidationFailureDetails', pipeline_response) @@ -1004,7 +1004,7 @@ def move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1067,7 +1067,7 @@ def validate( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateResponse', pipeline_response) @@ -1133,7 +1133,7 @@ def validate_move( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.DefaultErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/__init__.py new file mode 100644 index 000000000000..45c59c58316a --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._web_site_management_client import WebSiteManagementClient +from ._version import VERSION + +__version__ = VERSION +__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/v2020_12_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_configuration.py new file mode 100644 index 000000000000..aa2da31b5e36 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class WebSiteManagementClientConfiguration(Configuration): + """Configuration for WebSiteManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2020-12-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> 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.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 = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_metadata.json new file mode 100644 index 000000000000..f3fc544a38e9 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_metadata.json @@ -0,0 +1,329 @@ +{ + "chosen_version": "2020-12-01", + "total_api_version_list": ["2020-12-01"], + "client": { + "name": "WebSiteManagementClient", + "filename": "_web_site_management_client", + "description": "WebSite Management Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "app_service_certificate_orders": "AppServiceCertificateOrdersOperations", + "certificate_orders_diagnostics": "CertificateOrdersDiagnosticsOperations", + "certificate_registration_provider": "CertificateRegistrationProviderOperations", + "domains": "DomainsOperations", + "top_level_domains": "TopLevelDomainsOperations", + "domain_registration_provider": "DomainRegistrationProviderOperations", + "certificates": "CertificatesOperations", + "deleted_web_apps": "DeletedWebAppsOperations", + "diagnostics": "DiagnosticsOperations", + "global_model": "GlobalOperations", + "provider": "ProviderOperations", + "recommendations": "RecommendationsOperations", + "web_apps": "WebAppsOperations", + "static_sites": "StaticSitesOperations", + "app_service_environments": "AppServiceEnvironmentsOperations", + "app_service_plans": "AppServicePlansOperations", + "resource_health_metadata": "ResourceHealthMetadataOperations" + }, + "operation_mixins": { + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "operations": { + "generate_github_access_token_for_appservice_cli_async" : { + "sync": { + "signature": "def generate_github_access_token_for_appservice_cli_async(\n self,\n code, # type: str\n state, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Exchange code for GitHub access token for AppService CLI.\n\nDescription for Exchange code for GitHub access token for AppService CLI.\n\n:param code: Code string to exchange for Github Access token.\n:type code: str\n:param state: State string used for verification.\n:type state: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AppserviceGithubToken, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.AppserviceGithubToken\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def generate_github_access_token_for_appservice_cli_async(\n self,\n code: str,\n state: str,\n **kwargs\n) -\u003e \"_models.AppserviceGithubToken\":\n", + "doc": "\"\"\"Exchange code for GitHub access token for AppService CLI.\n\nDescription for Exchange code for GitHub access token for AppService CLI.\n\n:param code: Code string to exchange for Github Access token.\n:type code: str\n:param state: State string used for verification.\n:type state: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AppserviceGithubToken, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.AppserviceGithubToken\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "code, state" + }, + "get_publishing_user" : { + "sync": { + "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_publishing_user(\n self,\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "update_publishing_user" : { + "sync": { + "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_12_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs\n) -\u003e \"_models.User\":\n", + "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_12_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "user_details" + }, + "list_source_controls" : { + "sync": { + "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_source_controls(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.SourceControlCollection\"]:\n", + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "get_source_control" : { + "sync": { + "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type" + }, + "update_source_control" : { + "sync": { + "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs\n) -\u003e \"_models.SourceControl\":\n", + "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "source_control_type, request_message" + }, + "list_billing_meters" : { + "sync": { + "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.BillingMeterCollection\"]:\n", + "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "billing_location, os_type" + }, + "check_name_availability" : { + "sync": { + "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs\n) -\u003e \"_models.ResourceNameAvailability\":\n", + "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name, type, is_fqdn" + }, + "get_subscription_deployment_locations" : { + "sync": { + "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs\n) -\u003e \"_models.DeploymentLocations\":\n", + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_geo_regions" : { + "sync": { + "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.GeoRegionCollection\"]:\n", + "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" + }, + "list_site_identifiers_assigned_to_host_name" : { + "sync": { + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.IdentifierCollection\"]:\n", + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "name_identifier" + }, + "list_premier_add_on_offers" : { + "sync": { + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def list_premier_add_on_offers(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"_models.PremierAddOnOfferCollection\"]:\n", + "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "list_skus" : { + "sync": { + "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def list_skus(\n self,\n **kwargs\n) -\u003e \"_models.SkuInfos\":\n", + "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "" + }, + "verify_hosting_environment_vnet" : { + "sync": { + "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "parameters" + }, + "move" : { + "sync": { + "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + }, + "validate" : { + "sync": { + "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_12_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs\n) -\u003e \"_models.ValidateResponse\":\n", + "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_12_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, validate_request" + }, + "validate_move" : { + "sync": { + "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, move_resource_envelope" + } + } + } +} \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_version.py new file mode 100644 index 000000000000..5c14e0d8303d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_web_site_management_client.py new file mode 100644 index 000000000000..42a0aed760ac --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_web_site_management_client.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import AppServiceCertificateOrdersOperations +from .operations import CertificateOrdersDiagnosticsOperations +from .operations import CertificateRegistrationProviderOperations +from .operations import DomainsOperations +from .operations import TopLevelDomainsOperations +from .operations import DomainRegistrationProviderOperations +from .operations import CertificatesOperations +from .operations import DeletedWebAppsOperations +from .operations import DiagnosticsOperations +from .operations import GlobalOperations +from .operations import ProviderOperations +from .operations import RecommendationsOperations +from .operations import WebSiteManagementClientOperationsMixin +from .operations import WebAppsOperations +from .operations import StaticSitesOperations +from .operations import AppServiceEnvironmentsOperations +from .operations import AppServicePlansOperations +from .operations import ResourceHealthMetadataOperations +from . import models + + +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): + """WebSite Management Client. + + :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations + :vartype app_service_certificate_orders: azure.mgmt.web.v2020_12_01.operations.AppServiceCertificateOrdersOperations + :ivar certificate_orders_diagnostics: CertificateOrdersDiagnosticsOperations operations + :vartype certificate_orders_diagnostics: azure.mgmt.web.v2020_12_01.operations.CertificateOrdersDiagnosticsOperations + :ivar certificate_registration_provider: CertificateRegistrationProviderOperations operations + :vartype certificate_registration_provider: azure.mgmt.web.v2020_12_01.operations.CertificateRegistrationProviderOperations + :ivar domains: DomainsOperations operations + :vartype domains: azure.mgmt.web.v2020_12_01.operations.DomainsOperations + :ivar top_level_domains: TopLevelDomainsOperations operations + :vartype top_level_domains: azure.mgmt.web.v2020_12_01.operations.TopLevelDomainsOperations + :ivar domain_registration_provider: DomainRegistrationProviderOperations operations + :vartype domain_registration_provider: azure.mgmt.web.v2020_12_01.operations.DomainRegistrationProviderOperations + :ivar certificates: CertificatesOperations operations + :vartype certificates: azure.mgmt.web.v2020_12_01.operations.CertificatesOperations + :ivar deleted_web_apps: DeletedWebAppsOperations operations + :vartype deleted_web_apps: azure.mgmt.web.v2020_12_01.operations.DeletedWebAppsOperations + :ivar diagnostics: DiagnosticsOperations operations + :vartype diagnostics: azure.mgmt.web.v2020_12_01.operations.DiagnosticsOperations + :ivar global_model: GlobalOperations operations + :vartype global_model: azure.mgmt.web.v2020_12_01.operations.GlobalOperations + :ivar provider: ProviderOperations operations + :vartype provider: azure.mgmt.web.v2020_12_01.operations.ProviderOperations + :ivar recommendations: RecommendationsOperations operations + :vartype recommendations: azure.mgmt.web.v2020_12_01.operations.RecommendationsOperations + :ivar web_apps: WebAppsOperations operations + :vartype web_apps: azure.mgmt.web.v2020_12_01.operations.WebAppsOperations + :ivar static_sites: StaticSitesOperations operations + :vartype static_sites: azure.mgmt.web.v2020_12_01.operations.StaticSitesOperations + :ivar app_service_environments: AppServiceEnvironmentsOperations operations + :vartype app_service_environments: azure.mgmt.web.v2020_12_01.operations.AppServiceEnvironmentsOperations + :ivar app_service_plans: AppServicePlansOperations operations + :vartype app_service_plans: azure.mgmt.web.v2020_12_01.operations.AppServicePlansOperations + :ivar resource_health_metadata: ResourceHealthMetadataOperations operations + :vartype resource_health_metadata: azure.mgmt.web.v2020_12_01.operations.ResourceHealthMetadataOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = WebSiteManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.certificate_orders_diagnostics = CertificateOrdersDiagnosticsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.certificate_registration_provider = CertificateRegistrationProviderOperations( + self._client, self._config, self._serialize, self._deserialize) + self.domains = DomainsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.top_level_domains = TopLevelDomainsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.domain_registration_provider = DomainRegistrationProviderOperations( + self._client, self._config, self._serialize, self._deserialize) + self.certificates = CertificatesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.deleted_web_apps = DeletedWebAppsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.diagnostics = DiagnosticsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.global_model = GlobalOperations( + self._client, self._config, self._serialize, self._deserialize) + self.provider = ProviderOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recommendations = RecommendationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.web_apps = WebAppsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.static_sites = StaticSitesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.app_service_environments = AppServiceEnvironmentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.app_service_plans = AppServicePlansOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resource_health_metadata = ResourceHealthMetadataOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> WebSiteManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/__init__.py new file mode 100644 index 000000000000..fc106a4f3d78 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/__init__.py @@ -0,0 +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. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._web_site_management_client import WebSiteManagementClient +__all__ = ['WebSiteManagementClient'] diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_configuration.py new file mode 100644 index 000000000000..14fb87f96426 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class WebSiteManagementClientConfiguration(Configuration): + """Configuration for WebSiteManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :type subscription_id: str + """ + + 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: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2020-12-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) + 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') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_web_site_management_client.py new file mode 100644 index 000000000000..ce07a16761b6 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_web_site_management_client.py @@ -0,0 +1,163 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import WebSiteManagementClientConfiguration +from .operations import AppServiceCertificateOrdersOperations +from .operations import CertificateOrdersDiagnosticsOperations +from .operations import CertificateRegistrationProviderOperations +from .operations import DomainsOperations +from .operations import TopLevelDomainsOperations +from .operations import DomainRegistrationProviderOperations +from .operations import CertificatesOperations +from .operations import DeletedWebAppsOperations +from .operations import DiagnosticsOperations +from .operations import GlobalOperations +from .operations import ProviderOperations +from .operations import RecommendationsOperations +from .operations import WebSiteManagementClientOperationsMixin +from .operations import WebAppsOperations +from .operations import StaticSitesOperations +from .operations import AppServiceEnvironmentsOperations +from .operations import AppServicePlansOperations +from .operations import ResourceHealthMetadataOperations +from .. import models + + +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): + """WebSite Management Client. + + :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations + :vartype app_service_certificate_orders: azure.mgmt.web.v2020_12_01.aio.operations.AppServiceCertificateOrdersOperations + :ivar certificate_orders_diagnostics: CertificateOrdersDiagnosticsOperations operations + :vartype certificate_orders_diagnostics: azure.mgmt.web.v2020_12_01.aio.operations.CertificateOrdersDiagnosticsOperations + :ivar certificate_registration_provider: CertificateRegistrationProviderOperations operations + :vartype certificate_registration_provider: azure.mgmt.web.v2020_12_01.aio.operations.CertificateRegistrationProviderOperations + :ivar domains: DomainsOperations operations + :vartype domains: azure.mgmt.web.v2020_12_01.aio.operations.DomainsOperations + :ivar top_level_domains: TopLevelDomainsOperations operations + :vartype top_level_domains: azure.mgmt.web.v2020_12_01.aio.operations.TopLevelDomainsOperations + :ivar domain_registration_provider: DomainRegistrationProviderOperations operations + :vartype domain_registration_provider: azure.mgmt.web.v2020_12_01.aio.operations.DomainRegistrationProviderOperations + :ivar certificates: CertificatesOperations operations + :vartype certificates: azure.mgmt.web.v2020_12_01.aio.operations.CertificatesOperations + :ivar deleted_web_apps: DeletedWebAppsOperations operations + :vartype deleted_web_apps: azure.mgmt.web.v2020_12_01.aio.operations.DeletedWebAppsOperations + :ivar diagnostics: DiagnosticsOperations operations + :vartype diagnostics: azure.mgmt.web.v2020_12_01.aio.operations.DiagnosticsOperations + :ivar global_model: GlobalOperations operations + :vartype global_model: azure.mgmt.web.v2020_12_01.aio.operations.GlobalOperations + :ivar provider: ProviderOperations operations + :vartype provider: azure.mgmt.web.v2020_12_01.aio.operations.ProviderOperations + :ivar recommendations: RecommendationsOperations operations + :vartype recommendations: azure.mgmt.web.v2020_12_01.aio.operations.RecommendationsOperations + :ivar web_apps: WebAppsOperations operations + :vartype web_apps: azure.mgmt.web.v2020_12_01.aio.operations.WebAppsOperations + :ivar static_sites: StaticSitesOperations operations + :vartype static_sites: azure.mgmt.web.v2020_12_01.aio.operations.StaticSitesOperations + :ivar app_service_environments: AppServiceEnvironmentsOperations operations + :vartype app_service_environments: azure.mgmt.web.v2020_12_01.aio.operations.AppServiceEnvironmentsOperations + :ivar app_service_plans: AppServicePlansOperations operations + :vartype app_service_plans: azure.mgmt.web.v2020_12_01.aio.operations.AppServicePlansOperations + :ivar resource_health_metadata: ResourceHealthMetadataOperations operations + :vartype resource_health_metadata: azure.mgmt.web.v2020_12_01.aio.operations.ResourceHealthMetadataOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = WebSiteManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.certificate_orders_diagnostics = CertificateOrdersDiagnosticsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.certificate_registration_provider = CertificateRegistrationProviderOperations( + self._client, self._config, self._serialize, self._deserialize) + self.domains = DomainsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.top_level_domains = TopLevelDomainsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.domain_registration_provider = DomainRegistrationProviderOperations( + self._client, self._config, self._serialize, self._deserialize) + self.certificates = CertificatesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.deleted_web_apps = DeletedWebAppsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.diagnostics = DiagnosticsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.global_model = GlobalOperations( + self._client, self._config, self._serialize, self._deserialize) + self.provider = ProviderOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recommendations = RecommendationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.web_apps = WebAppsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.static_sites = StaticSitesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.app_service_environments = AppServiceEnvironmentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.app_service_plans = AppServicePlansOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resource_health_metadata = ResourceHealthMetadataOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "WebSiteManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/__init__.py new file mode 100644 index 000000000000..7359a8580a22 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/__init__.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations +from ._certificate_orders_diagnostics_operations import CertificateOrdersDiagnosticsOperations +from ._certificate_registration_provider_operations import CertificateRegistrationProviderOperations +from ._domains_operations import DomainsOperations +from ._top_level_domains_operations import TopLevelDomainsOperations +from ._domain_registration_provider_operations import DomainRegistrationProviderOperations +from ._certificates_operations import CertificatesOperations +from ._deleted_web_apps_operations import DeletedWebAppsOperations +from ._diagnostics_operations import DiagnosticsOperations +from ._global_model_operations import GlobalOperations +from ._provider_operations import ProviderOperations +from ._recommendations_operations import RecommendationsOperations +from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin +from ._web_apps_operations import WebAppsOperations +from ._static_sites_operations import StaticSitesOperations +from ._app_service_environments_operations import AppServiceEnvironmentsOperations +from ._app_service_plans_operations import AppServicePlansOperations +from ._resource_health_metadata_operations import ResourceHealthMetadataOperations + +__all__ = [ + 'AppServiceCertificateOrdersOperations', + 'CertificateOrdersDiagnosticsOperations', + 'CertificateRegistrationProviderOperations', + 'DomainsOperations', + 'TopLevelDomainsOperations', + 'DomainRegistrationProviderOperations', + 'CertificatesOperations', + 'DeletedWebAppsOperations', + 'DiagnosticsOperations', + 'GlobalOperations', + 'ProviderOperations', + 'RecommendationsOperations', + 'WebSiteManagementClientOperationsMixin', + 'WebAppsOperations', + 'StaticSitesOperations', + 'AppServiceEnvironmentsOperations', + 'AppServicePlansOperations', + 'ResourceHealthMetadataOperations', +] diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_certificate_orders_operations.py new file mode 100644 index 000000000000..3ff27b2005d6 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_certificate_orders_operations.py @@ -0,0 +1,1491 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AppServiceCertificateOrdersOperations: + """AppServiceCertificateOrdersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: + """List all certificate orders in a subscription. + + Description for List all certificate orders in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AppServiceCertificateOrderCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + + async def validate_purchase_information( + self, + app_service_certificate_order: "_models.AppServiceCertificateOrder", + **kwargs + ) -> None: + """Validate information for a certificate order. + + Description for Validate information for a certificate order. + + :param app_service_certificate_order: Information for a certificate order. + :type app_service_certificate_order: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_purchase_information.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: + """Get certificate orders in a resource group. + + Description for Get certificate orders in a resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AppServiceCertificateOrderCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + + async def get( + self, + resource_group_name: str, + certificate_order_name: str, + **kwargs + ) -> "_models.AppServiceCertificateOrder": + """Get a certificate order. + + Description for Get a certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order.. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceCertificateOrder, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + certificate_order_name: str, + certificate_distinguished_name: "_models.AppServiceCertificateOrder", + **kwargs + ) -> "_models.AppServiceCertificateOrder": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + certificate_order_name: str, + certificate_distinguished_name: "_models.AppServiceCertificateOrder", + **kwargs + ) -> AsyncLROPoller["_models.AppServiceCertificateOrder"]: + """Create or update a certificate purchase order. + + Description for Create or update a certificate purchase order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param certificate_distinguished_name: Distinguished name to use for the certificate order. + :type certificate_distinguished_name: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AppServiceCertificateOrder or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + certificate_order_name=certificate_order_name, + certificate_distinguished_name=certificate_distinguished_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + certificate_order_name: str, + **kwargs + ) -> None: + """Delete an existing certificate order. + + Description for Delete an existing certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + certificate_order_name: str, + certificate_distinguished_name: "_models.AppServiceCertificateOrderPatchResource", + **kwargs + ) -> "_models.AppServiceCertificateOrder": + """Create or update a certificate purchase order. + + Description for Create or update a certificate purchase order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param certificate_distinguished_name: Distinguished name to use for the certificate order. + :type certificate_distinguished_name: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceCertificateOrder, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + + def list_certificates( + self, + resource_group_name: str, + certificate_order_name: str, + **kwargs + ) -> AsyncIterable["_models.AppServiceCertificateCollection"]: + """List all certificates associated with a certificate order. + + Description for List all certificates associated with a certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServiceCertificateCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_certificates.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AppServiceCertificateCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + + async def get_certificate( + self, + resource_group_name: str, + certificate_order_name: str, + name: str, + **kwargs + ) -> "_models.AppServiceCertificateResource": + """Get the certificate associated with a certificate order. + + Description for Get the certificate associated with a certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name: Name of the certificate. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceCertificateResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + + async def _create_or_update_certificate_initial( + self, + resource_group_name: str, + certificate_order_name: str, + name: str, + key_vault_certificate: "_models.AppServiceCertificateResource", + **kwargs + ) -> "_models.AppServiceCertificateResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_certificate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + + async def begin_create_or_update_certificate( + self, + resource_group_name: str, + certificate_order_name: str, + name: str, + key_vault_certificate: "_models.AppServiceCertificateResource", + **kwargs + ) -> AsyncLROPoller["_models.AppServiceCertificateResource"]: + """Creates or updates a certificate and associates with key vault secret. + + Description for Creates or updates a certificate and associates with key vault secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name: Name of the certificate. + :type name: str + :param key_vault_certificate: Key vault certificate resource Id. + :type key_vault_certificate: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AppServiceCertificateResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_certificate_initial( + resource_group_name=resource_group_name, + certificate_order_name=certificate_order_name, + name=name, + key_vault_certificate=key_vault_certificate, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + + async def delete_certificate( + self, + resource_group_name: str, + certificate_order_name: str, + name: str, + **kwargs + ) -> None: + """Delete the certificate associated with a certificate order. + + Description for Delete the certificate associated with a certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name: Name of the certificate. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + + async def update_certificate( + self, + resource_group_name: str, + certificate_order_name: str, + name: str, + key_vault_certificate: "_models.AppServiceCertificatePatchResource", + **kwargs + ) -> "_models.AppServiceCertificateResource": + """Creates or updates a certificate and associates with key vault secret. + + Description for Creates or updates a certificate and associates with key vault secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name: Name of the certificate. + :type name: str + :param key_vault_certificate: Key vault certificate resource Id. + :type key_vault_certificate: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificatePatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceCertificateResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + + async def reissue( + self, + resource_group_name: str, + certificate_order_name: str, + reissue_certificate_order_request: "_models.ReissueCertificateOrderRequest", + **kwargs + ) -> None: + """Reissue an existing certificate order. + + Description for Reissue an existing certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param reissue_certificate_order_request: Parameters for the reissue. + :type reissue_certificate_order_request: ~azure.mgmt.web.v2020_12_01.models.ReissueCertificateOrderRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.reissue.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + + async def renew( + self, + resource_group_name: str, + certificate_order_name: str, + renew_certificate_order_request: "_models.RenewCertificateOrderRequest", + **kwargs + ) -> None: + """Renew an existing certificate order. + + Description for Renew an existing certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param renew_certificate_order_request: Renew parameters. + :type renew_certificate_order_request: ~azure.mgmt.web.v2020_12_01.models.RenewCertificateOrderRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.renew.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + + async def resend_email( + self, + resource_group_name: str, + certificate_order_name: str, + **kwargs + ) -> None: + """Resend certificate email. + + Description for Resend certificate email. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.resend_email.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + + async def resend_request_emails( + self, + resource_group_name: str, + certificate_order_name: str, + name_identifier: "_models.NameIdentifier", + **kwargs + ) -> None: + """Verify domain ownership for this certificate order. + + Description for Verify domain ownership for this certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name_identifier: Email address. + :type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.resend_request_emails.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + + async def retrieve_site_seal( + self, + resource_group_name: str, + certificate_order_name: str, + site_seal_request: "_models.SiteSealRequest", + **kwargs + ) -> "_models.SiteSeal": + """Verify domain ownership for this certificate order. + + Description for Verify domain ownership for this certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param site_seal_request: Site seal request. + :type site_seal_request: ~azure.mgmt.web.v2020_12_01.models.SiteSealRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteSeal, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSeal + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSeal"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.retrieve_site_seal.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteSeal', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + + async def verify_domain_ownership( + self, + resource_group_name: str, + certificate_order_name: str, + **kwargs + ) -> None: + """Verify domain ownership for this certificate order. + + Description for Verify domain ownership for this certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.verify_domain_ownership.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + + async def retrieve_certificate_actions( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> List["_models.CertificateOrderAction"]: + """Retrieve the list of certificate actions. + + Description for Retrieve the list of certificate actions. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate order. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of CertificateOrderAction, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.CertificateOrderAction] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.CertificateOrderAction"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.retrieve_certificate_actions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[CertificateOrderAction]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + + async def retrieve_certificate_email_history( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> List["_models.CertificateEmail"]: + """Retrieve email history. + + Description for Retrieve email history. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate order. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of CertificateEmail, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.CertificateEmail] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.CertificateEmail"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.retrieve_certificate_email_history.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[CertificateEmail]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_environments_operations.py new file mode 100644 index 000000000000..81bf8e6cae5f --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_environments_operations.py @@ -0,0 +1,3848 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AppServiceEnvironmentsOperations: + """AppServiceEnvironmentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: + """Get all App Service Environments for a subscription. + + Description for Get all App Service Environments for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AppServiceEnvironmentCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: + """Get all App Service Environments in a resource group. + + Description for Get all App Service Environments in a resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AppServiceEnvironmentCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + + async def get( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.AppServiceEnvironmentResource": + """Get the properties of an App Service Environment. + + Description for Get the properties of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceEnvironmentResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + name: str, + hosting_environment_envelope: "_models.AppServiceEnvironmentResource", + **kwargs + ) -> "_models.AppServiceEnvironmentResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + name: str, + hosting_environment_envelope: "_models.AppServiceEnvironmentResource", + **kwargs + ) -> AsyncLROPoller["_models.AppServiceEnvironmentResource"]: + """Create or update an App Service Environment. + + Description for Create or update an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param hosting_environment_envelope: Configuration details of the App Service Environment. + :type hosting_environment_envelope: ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + hosting_environment_envelope=hosting_environment_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + name: str, + force_delete: Optional[bool] = None, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + name: str, + force_delete: Optional[bool] = None, + **kwargs + ) -> AsyncLROPoller[None]: + """Delete an App Service Environment. + + Description for Delete an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param force_delete: Specify :code:`true` to force the deletion even if the App + Service Environment contains resources. The default is :code:`false`. + :type force_delete: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + async def update( + self, + resource_group_name: str, + name: str, + hosting_environment_envelope: "_models.AppServiceEnvironmentPatchResource", + **kwargs + ) -> "_models.AppServiceEnvironmentResource": + """Create or update an App Service Environment. + + Description for Create or update an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param hosting_environment_envelope: Configuration details of the App Service Environment. + :type hosting_environment_envelope: ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceEnvironmentResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + def list_capacities( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.StampCapacityCollection"]: + """Get the used, available, and total worker capacity an App Service Environment. + + Description for Get the used, available, and total worker capacity an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StampCapacityCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StampCapacityCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_capacities.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StampCapacityCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + + async def get_vip_info( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.AddressResponse": + """Get IP addresses assigned to an App Service Environment. + + Description for Get IP addresses assigned to an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AddressResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vip_info.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + + async def _change_vnet_initial( + self, + resource_group_name: str, + name: str, + vnet_info: "_models.VirtualNetworkProfile", + **kwargs + ) -> "_models.WebAppCollection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._change_vnet_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + + async def begin_change_vnet( + self, + resource_group_name: str, + name: str, + vnet_info: "_models.VirtualNetworkProfile", + **kwargs + ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: + """Move an App Service Environment to a different VNET. + + Description for Move an App Service Environment to a different VNET. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param vnet_info: Details for the new virtual network. + :type vnet_info: ~azure.mgmt.web.v2020_12_01.models.VirtualNetworkProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.change_vnet.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._change_vnet_initial( + resource_group_name=resource_group_name, + name=name, + vnet_info=vnet_info, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + def get_long_running_output(pipeline_response): + async def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + else: + return await get_next(next_link) + + return AsyncItemPaged( + internal_get_next, extract_data + ) + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + + async def get_ase_v3_networking_configuration( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.AseV3NetworkingConfiguration": + """Get networking configuration of an App Service Environment. + + Description for Get networking configuration of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AseV3NetworkingConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AseV3NetworkingConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AseV3NetworkingConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ase_v3_networking_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AseV3NetworkingConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + + async def update_ase_networking_configuration( + self, + resource_group_name: str, + name: str, + ase_networking_configuration: "_models.AseV3NetworkingConfiguration", + **kwargs + ) -> "_models.AseV3NetworkingConfiguration": + """Update networking configuration of an App Service Environment. + + Description for Update networking configuration of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param ase_networking_configuration: + :type ase_networking_configuration: ~azure.mgmt.web.v2020_12_01.models.AseV3NetworkingConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AseV3NetworkingConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AseV3NetworkingConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AseV3NetworkingConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_ase_networking_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AseV3NetworkingConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + + async def list_diagnostics( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> List["_models.HostingEnvironmentDiagnostics"]: + """Get diagnostic information for an App Service Environment. + + Description for Get diagnostic information for an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of HostingEnvironmentDiagnostics, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentDiagnostics] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.HostingEnvironmentDiagnostics"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_diagnostics.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + + async def get_diagnostics_item( + self, + resource_group_name: str, + name: str, + diagnostics_name: str, + **kwargs + ) -> "_models.HostingEnvironmentDiagnostics": + """Get a diagnostics item for an App Service Environment. + + Description for Get a diagnostics item for an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param diagnostics_name: Name of the diagnostics item. + :type diagnostics_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostingEnvironmentDiagnostics, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentDiagnostics + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostingEnvironmentDiagnostics"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_diagnostics_item.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'diagnosticsName': self._serialize.url("diagnostics_name", diagnostics_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostingEnvironmentDiagnostics', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + + def get_inbound_network_dependencies_endpoints( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.InboundEnvironmentEndpointCollection"]: + """Get the network endpoints of all inbound dependencies of an App Service Environment. + + Description for Get the network endpoints of all inbound dependencies of an App Service + Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either InboundEnvironmentEndpointCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.InboundEnvironmentEndpointCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_inbound_network_dependencies_endpoints.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('InboundEnvironmentEndpointCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + + def list_multi_role_pools( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.WorkerPoolCollection"]: + """Get all multi-role pools. + + Description for Get all multi-role pools. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkerPoolCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_multi_role_pools.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkerPoolCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + + async def get_multi_role_pool( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.WorkerPoolResource": + """Get properties of a multi-role pool. + + Description for Get properties of a multi-role pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkerPoolResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_multi_role_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + + async def _create_or_update_multi_role_pool_initial( + self, + resource_group_name: str, + name: str, + multi_role_pool_envelope: "_models.WorkerPoolResource", + **kwargs + ) -> "_models.WorkerPoolResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_multi_role_pool_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + + async def begin_create_or_update_multi_role_pool( + self, + resource_group_name: str, + name: str, + multi_role_pool_envelope: "_models.WorkerPoolResource", + **kwargs + ) -> AsyncLROPoller["_models.WorkerPoolResource"]: + """Create or update a multi-role pool. + + Description for Create or update a multi-role pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param multi_role_pool_envelope: Properties of the multi-role pool. + :type multi_role_pool_envelope: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_multi_role_pool_initial( + resource_group_name=resource_group_name, + name=name, + multi_role_pool_envelope=multi_role_pool_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + + async def update_multi_role_pool( + self, + resource_group_name: str, + name: str, + multi_role_pool_envelope: "_models.WorkerPoolResource", + **kwargs + ) -> "_models.WorkerPoolResource": + """Create or update a multi-role pool. + + Description for Create or update a multi-role pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param multi_role_pool_envelope: Properties of the multi-role pool. + :type multi_role_pool_envelope: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkerPoolResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_multi_role_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + + def list_multi_role_pool_instance_metric_definitions( + self, + resource_group_name: str, + name: str, + instance: str, + **kwargs + ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: + """Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + + Description for Get metric definitions for a specific instance of a multi-role pool of an App + Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param instance: Name of the instance in the multi-role pool. + :type instance: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceMetricDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instance': self._serialize.url("instance", instance, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceMetricDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + + def list_multi_role_metric_definitions( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: + """Get metric definitions for a multi-role pool of an App Service Environment. + + Description for Get metric definitions for a multi-role pool of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceMetricDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_multi_role_metric_definitions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceMetricDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + + def list_multi_role_pool_skus( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.SkuInfoCollection"]: + """Get available SKUs for scaling a multi-role pool. + + Description for Get available SKUs for scaling a multi-role pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SkuInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_multi_role_pool_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SkuInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + + def list_multi_role_usages( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.UsageCollection"]: + """Get usage metrics for a multi-role pool of an App Service Environment. + + Description for Get usage metrics for a multi-role pool of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UsageCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.UsageCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_multi_role_usages.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('UsageCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + + async def list_operations( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> List["_models.Operation"]: + """List all currently running operations on the App Service Environment. + + Description for List all currently running operations on the App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of Operation, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.Operation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.Operation"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_operations.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[Operation]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + + def get_outbound_network_dependencies_endpoints( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: + """Get the network endpoints of all outbound dependencies of an App Service Environment. + + Description for Get the network endpoints of all outbound dependencies of an App Service + Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundEnvironmentEndpointCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.OutboundEnvironmentEndpointCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_outbound_network_dependencies_endpoints.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OutboundEnvironmentEndpointCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + + def get_private_endpoint_connection_list( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: + """Gets the list of private endpoints associated with a hosting environment. + + Description for Gets the list of private endpoints associated with a hosting environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} # type: ignore + + async def get_private_endpoint_connection( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> "_models.RemotePrivateEndpointConnectionARMResource": + """Gets a private endpoint connection. + + Description for Gets a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RemotePrivateEndpointConnectionARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _approve_or_reject_private_endpoint_connection_initial( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + private_endpoint_wrapper: "_models.PrivateLinkConnectionApprovalRequestResource", + **kwargs + ) -> "_models.RemotePrivateEndpointConnectionARMResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._approve_or_reject_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_approve_or_reject_private_endpoint_connection( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + private_endpoint_wrapper: "_models.PrivateLinkConnectionApprovalRequestResource", + **kwargs + ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: + """Approves or rejects a private endpoint connection. + + Description for Approves or rejects a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param private_endpoint_wrapper: + :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionApprovalRequestResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RemotePrivateEndpointConnectionARMResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._approve_or_reject_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_wrapper=private_endpoint_wrapper, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_private_endpoint_connection_initial( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> object: + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 204: + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete_private_endpoint_connection( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> AsyncLROPoller[object]: + """Deletes a private endpoint connection. + + Description for Deletes a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either object or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[object] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[object] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def get_private_link_resources( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.PrivateLinkResourcesWrapper": + """Gets the private link resources. + + Description for Gets the private link resources. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesWrapper, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesWrapper"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_link_resources.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} # type: ignore + + async def reboot( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Reboot all machines in an App Service Environment. + + Description for Reboot all machines in an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reboot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + + async def _resume_initial( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.WebAppCollection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._resume_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + + async def begin_resume( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: + """Resume an App Service Environment. + + Description for Resume an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.resume.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._resume_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + def get_long_running_output(pipeline_response): + async def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + else: + return await get_next(next_link) + + return AsyncItemPaged( + internal_get_next, extract_data + ) + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + + def list_app_service_plans( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.AppServicePlanCollection"]: + """Get all App Service plans in an App Service Environment. + + Description for Get all App Service plans in an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServicePlanCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_app_service_plans.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AppServicePlanCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + + def list_web_apps( + self, + resource_group_name: str, + name: str, + properties_to_include: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.WebAppCollection"]: + """Get all apps in an App Service Environment. + + Description for Get all apps in an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param properties_to_include: Comma separated list of app properties to include. + :type properties_to_include: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if properties_to_include is not None: + query_parameters['propertiesToInclude'] = self._serialize.query("properties_to_include", properties_to_include, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + + async def _suspend_initial( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.WebAppCollection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._suspend_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + + async def begin_suspend( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: + """Suspend an App Service Environment. + + Description for Suspend an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.suspend.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._suspend_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + def get_long_running_output(pipeline_response): + async def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + else: + return await get_next(next_link) + + return AsyncItemPaged( + internal_get_next, extract_data + ) + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + + def list_usages( + self, + resource_group_name: str, + name: str, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: + """Get global usage metrics of an App Service Environment. + + Description for Get global usage metrics of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param filter: Return only usages/metrics specified in the filter. Filter conforms to odata + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq + 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + duration'[Hour|Minute|Day]'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmUsageQuotaCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CsmUsageQuotaCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + + def list_worker_pools( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.WorkerPoolCollection"]: + """Get all worker pools of an App Service Environment. + + Description for Get all worker pools of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkerPoolCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_worker_pools.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkerPoolCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + + async def get_worker_pool( + self, + resource_group_name: str, + name: str, + worker_pool_name: str, + **kwargs + ) -> "_models.WorkerPoolResource": + """Get properties of a worker pool. + + Description for Get properties of a worker pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkerPoolResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_worker_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + + async def _create_or_update_worker_pool_initial( + self, + resource_group_name: str, + name: str, + worker_pool_name: str, + worker_pool_envelope: "_models.WorkerPoolResource", + **kwargs + ) -> "_models.WorkerPoolResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_worker_pool_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + + async def begin_create_or_update_worker_pool( + self, + resource_group_name: str, + name: str, + worker_pool_name: str, + worker_pool_envelope: "_models.WorkerPoolResource", + **kwargs + ) -> AsyncLROPoller["_models.WorkerPoolResource"]: + """Create or update a worker pool. + + Description for Create or update a worker pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :param worker_pool_envelope: Properties of the worker pool. + :type worker_pool_envelope: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either WorkerPoolResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_worker_pool_initial( + resource_group_name=resource_group_name, + name=name, + worker_pool_name=worker_pool_name, + worker_pool_envelope=worker_pool_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + + async def update_worker_pool( + self, + resource_group_name: str, + name: str, + worker_pool_name: str, + worker_pool_envelope: "_models.WorkerPoolResource", + **kwargs + ) -> "_models.WorkerPoolResource": + """Create or update a worker pool. + + Description for Create or update a worker pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :param worker_pool_envelope: Properties of the worker pool. + :type worker_pool_envelope: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkerPoolResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_worker_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + + def list_worker_pool_instance_metric_definitions( + self, + resource_group_name: str, + name: str, + worker_pool_name: str, + instance: str, + **kwargs + ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: + """Get metric definitions for a specific instance of a worker pool of an App Service Environment. + + Description for Get metric definitions for a specific instance of a worker pool of an App + Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :param instance: Name of the instance in the worker pool. + :type instance: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceMetricDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_worker_pool_instance_metric_definitions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'instance': self._serialize.url("instance", instance, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceMetricDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + + def list_web_worker_metric_definitions( + self, + resource_group_name: str, + name: str, + worker_pool_name: str, + **kwargs + ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: + """Get metric definitions for a worker pool of an App Service Environment. + + Description for Get metric definitions for a worker pool of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceMetricDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_worker_metric_definitions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceMetricDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + + def list_worker_pool_skus( + self, + resource_group_name: str, + name: str, + worker_pool_name: str, + **kwargs + ) -> AsyncIterable["_models.SkuInfoCollection"]: + """Get available SKUs for scaling a worker pool. + + Description for Get available SKUs for scaling a worker pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SkuInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_worker_pool_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SkuInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + + def list_web_worker_usages( + self, + resource_group_name: str, + name: str, + worker_pool_name: str, + **kwargs + ) -> AsyncIterable["_models.UsageCollection"]: + """Get usage metrics for a worker pool of an App Service Environment. + + Description for Get usage metrics for a worker pool of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UsageCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.UsageCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_worker_usages.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('UsageCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_plans_operations.py new file mode 100644 index 000000000000..adaad5f2d1f6 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_plans_operations.py @@ -0,0 +1,2007 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AppServicePlansOperations: + """AppServicePlansOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + detailed: Optional[bool] = None, + **kwargs + ) -> AsyncIterable["_models.AppServicePlanCollection"]: + """Get all App Service plans for a subscription. + + Description for Get all App Service plans for a subscription. + + :param detailed: Specify :code:`true` to return all App Service plan properties. + The default is :code:`false`, which returns a subset of the properties. + Retrieval of all properties may increase the API latency. + :type detailed: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServicePlanCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if detailed is not None: + query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AppServicePlanCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.AppServicePlanCollection"]: + """Get all App Service plans in a resource group. + + Description for Get all App Service plans in a resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServicePlanCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AppServicePlanCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + + async def get( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> Optional["_models.AppServicePlan"]: + """Get an App Service plan. + + Description for Get an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServicePlan, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServicePlan or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AppServicePlan"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + name: str, + app_service_plan: "_models.AppServicePlan", + **kwargs + ) -> "_models.AppServicePlan": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_service_plan, 'AppServicePlan') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + name: str, + app_service_plan: "_models.AppServicePlan", + **kwargs + ) -> AsyncLROPoller["_models.AppServicePlan"]: + """Creates or updates an App Service Plan. + + Description for Creates or updates an App Service Plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param app_service_plan: Details of the App Service plan. + :type app_service_plan: ~azure.mgmt.web.v2020_12_01.models.AppServicePlan + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AppServicePlan or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + app_service_plan=app_service_plan, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Delete an App Service plan. + + Description for Delete an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + + async def update( + self, + resource_group_name: str, + name: str, + app_service_plan: "_models.AppServicePlanPatchResource", + **kwargs + ) -> "_models.AppServicePlan": + """Creates or updates an App Service Plan. + + Description for Creates or updates an App Service Plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param app_service_plan: Details of the App Service plan. + :type app_service_plan: ~azure.mgmt.web.v2020_12_01.models.AppServicePlanPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServicePlan, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServicePlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + + async def list_capabilities( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> List["_models.Capability"]: + """List all capabilities of an App Service plan. + + Description for List all capabilities of an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of Capability, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.Capability] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.Capability"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_capabilities.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[Capability]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + + async def get_hybrid_connection( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + **kwargs + ) -> "_models.HybridConnection": + """Retrieve a Hybrid Connection in use in an App Service plan. + + Description for Retrieve a Hybrid Connection in use in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param namespace_name: Name of the Service Bus namespace. + :type namespace_name: str + :param relay_name: Name of the Service Bus relay. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + async def delete_hybrid_connection( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + **kwargs + ) -> None: + """Delete a Hybrid Connection in use in an App Service plan. + + Description for Delete a Hybrid Connection in use in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param namespace_name: Name of the Service Bus namespace. + :type namespace_name: str + :param relay_name: Name of the Service Bus relay. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + async def list_hybrid_connection_keys( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + **kwargs + ) -> "_models.HybridConnectionKey": + """Get the send key name and value of a Hybrid Connection. + + Description for Get the send key name and value of a Hybrid Connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param namespace_name: The name of the Service Bus namespace. + :type namespace_name: str + :param relay_name: The name of the Service Bus relay. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnectionKey, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnectionKey + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionKey"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_hybrid_connection_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnectionKey', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + + def list_web_apps_by_hybrid_connection( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + **kwargs + ) -> AsyncIterable["_models.ResourceCollection"]: + """Get all apps that use a Hybrid Connection in an App Service Plan. + + Description for Get all apps that use a Hybrid Connection in an App Service Plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param namespace_name: Name of the Hybrid Connection namespace. + :type namespace_name: str + :param relay_name: Name of the Hybrid Connection relay. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_apps_by_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + + async def get_hybrid_connection_plan_limit( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.HybridConnectionLimits": + """Get the maximum number of Hybrid Connections allowed in an App Service plan. + + Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnectionLimits, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnectionLimits + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionLimits"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_hybrid_connection_plan_limit.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnectionLimits', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + + def list_hybrid_connections( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.HybridConnectionCollection"]: + """Retrieve all Hybrid Connections in use in an App Service plan. + + Description for Retrieve all Hybrid Connections in use in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HybridConnectionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.HybridConnectionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_hybrid_connections.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('HybridConnectionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + + async def restart_web_apps( + self, + resource_group_name: str, + name: str, + soft_restart: Optional[bool] = None, + **kwargs + ) -> None: + """Restart all apps in an App Service plan. + + Description for Restart all apps in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param soft_restart: Specify :code:`true` to perform a soft restart, applies the + configuration settings and restarts the apps if necessary. The default is + :code:`false`, which always restarts and reprovisions the apps. + :type soft_restart: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.restart_web_apps.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + + def list_web_apps( + self, + resource_group_name: str, + name: str, + skip_token: Optional[str] = None, + filter: Optional[str] = None, + top: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.WebAppCollection"]: + """Get all apps associated with an App Service plan. + + Description for Get all apps associated with an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param skip_token: Skip to a web app in the list of webapps associated with app service plan. + If specified, the resulting list will contain web apps starting from (including) the skipToken. + Otherwise, the resulting list contains web apps from the start of the list. + :type skip_token: str + :param filter: Supported filter: $filter=state eq running. Returns only web apps that are + currently running. + :type filter: str + :param top: List page size. If specified, results are paged. + :type top: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + + async def get_server_farm_skus( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> object: + """Gets all selectable SKUs for a given App Service Plan. + + Description for Gets all selectable SKUs for a given App Service Plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of App Service Plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: object, or the result of cls(response) + :rtype: object + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_server_farm_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + + def list_usages( + self, + resource_group_name: str, + name: str, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: + """Gets server farm usage information. + + Description for Gets server farm usage information. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of App Service Plan. + :type name: str + :param filter: Return only usages/metrics specified in the filter. Filter conforms to odata + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmUsageQuotaCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CsmUsageQuotaCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + + async def list_vnets( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> List["_models.VnetInfo"]: + """Get all Virtual Networks associated with an App Service plan. + + Description for Get all Virtual Networks associated with an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of VnetInfo, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.VnetInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_vnets.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[VnetInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + + async def get_vnet_from_server_farm( + self, + resource_group_name: str, + name: str, + vnet_name: str, + **kwargs + ) -> Optional["_models.VnetInfo"]: + """Get a Virtual Network associated with an App Service plan. + + Description for Get a Virtual Network associated with an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VnetInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_from_server_farm.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + + async def get_vnet_gateway( + self, + resource_group_name: str, + name: str, + vnet_name: str, + gateway_name: str, + **kwargs + ) -> "_models.VnetGateway": + """Get a Virtual Network gateway. + + Description for Get a Virtual Network gateway. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Only the 'primary' gateway is supported. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + async def update_vnet_gateway( + self, + resource_group_name: str, + name: str, + vnet_name: str, + gateway_name: str, + connection_envelope: "_models.VnetGateway", + **kwargs + ) -> "_models.VnetGateway": + """Update a Virtual Network gateway. + + Description for Update a Virtual Network gateway. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Only the 'primary' gateway is supported. + :type gateway_name: str + :param connection_envelope: Definition of the gateway. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + async def list_routes_for_vnet( + self, + resource_group_name: str, + name: str, + vnet_name: str, + **kwargs + ) -> List["_models.VnetRoute"]: + """Get all routes that are associated with a Virtual Network in an App Service plan. + + Description for Get all routes that are associated with a Virtual Network in an App Service + plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of VnetRoute, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetRoute] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.VnetRoute"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_routes_for_vnet.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[VnetRoute]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + + async def get_route_for_vnet( + self, + resource_group_name: str, + name: str, + vnet_name: str, + route_name: str, + **kwargs + ) -> Optional[List["_models.VnetRoute"]]: + """Get a Virtual Network route in an App Service plan. + + Description for Get a Virtual Network route in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param route_name: Name of the Virtual Network route. + :type route_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of VnetRoute, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetRoute] or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.VnetRoute"]]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_route_for_vnet.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + + async def create_or_update_vnet_route( + self, + resource_group_name: str, + name: str, + vnet_name: str, + route_name: str, + route: "_models.VnetRoute", + **kwargs + ) -> Optional["_models.VnetRoute"]: + """Create or update a Virtual Network route in an App Service plan. + + Description for Create or update a Virtual Network route in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param route_name: Name of the Virtual Network route. + :type route_name: str + :param route: Definition of the Virtual Network route. + :type route: ~azure.mgmt.web.v2020_12_01.models.VnetRoute + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetRoute, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetRoute or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VnetRoute"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_vnet_route.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(route, 'VnetRoute') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 400, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + + async def delete_vnet_route( + self, + resource_group_name: str, + name: str, + vnet_name: str, + route_name: str, + **kwargs + ) -> None: + """Delete a Virtual Network route in an App Service plan. + + Description for Delete a Virtual Network route in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param route_name: Name of the Virtual Network route. + :type route_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_vnet_route.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + + async def update_vnet_route( + self, + resource_group_name: str, + name: str, + vnet_name: str, + route_name: str, + route: "_models.VnetRoute", + **kwargs + ) -> Optional["_models.VnetRoute"]: + """Create or update a Virtual Network route in an App Service plan. + + Description for Create or update a Virtual Network route in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param route_name: Name of the Virtual Network route. + :type route_name: str + :param route: Definition of the Virtual Network route. + :type route: ~azure.mgmt.web.v2020_12_01.models.VnetRoute + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetRoute, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetRoute or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VnetRoute"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_route.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(route, 'VnetRoute') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 400, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + + async def reboot_worker( + self, + resource_group_name: str, + name: str, + worker_name: str, + **kwargs + ) -> None: + """Reboot a worker machine in an App Service plan. + + Description for Reboot a worker machine in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param worker_name: Name of worker machine, which typically starts with RD. + :type worker_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reboot_worker.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerName': self._serialize.url("worker_name", worker_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_orders_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_orders_diagnostics_operations.py new file mode 100644 index 000000000000..db9e120aba1b --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_orders_diagnostics_operations.py @@ -0,0 +1,201 @@ +# 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 datetime +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CertificateOrdersDiagnosticsOperations: + """CertificateOrdersDiagnosticsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_app_service_certificate_order_detector_response( + self, + resource_group_name: str, + certificate_order_name: str, + **kwargs + ) -> AsyncIterable["_models.DetectorResponseCollection"]: + """Microsoft.CertificateRegistration to get the list of detectors for this RP. + + Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: The certificate order name for which the response is needed. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DetectorResponseCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_app_service_certificate_order_detector_response.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DetectorResponseCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} # type: ignore + + async def get_app_service_certificate_order_detector_response( + self, + resource_group_name: str, + certificate_order_name: str, + detector_name: str, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + time_grain: Optional[str] = None, + **kwargs + ) -> "_models.DetectorResponse": + """Microsoft.CertificateRegistration call to get a detector response from App Lens. + + Description for Microsoft.CertificateRegistration call to get a detector response from App + Lens. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: The certificate order name for which the response is needed. + :type certificate_order_name: str + :param detector_name: The detector name which needs to be run. + :type detector_name: str + :param start_time: The start time for detector response. + :type start_time: ~datetime.datetime + :param end_time: The end time for the detector response. + :type end_time: ~datetime.datetime + :param time_grain: The time grain for the detector response. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_app_service_certificate_order_detector_response.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py new file mode 100644 index 000000000000..a40dc5421479 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CertificateRegistrationProviderOperations: + """CertificateRegistrationProviderOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_operations( + self, + **kwargs + ) -> AsyncIterable["_models.CsmOperationCollection"]: + """Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + + Description for Implements Csm operations Api to exposes the list of available Csm Apis under + the resource provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmOperationCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CsmOperationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificates_operations.py new file mode 100644 index 000000000000..62e7af4ca3c4 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificates_operations.py @@ -0,0 +1,447 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CertificatesOperations: + """CertificatesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.CertificateCollection"]: + """Get all certificates for a subscription. + + Description for Get all certificates for a subscription. + + :param filter: Return only information specified in the filter (using OData syntax). For + example: $filter=KeyVaultId eq 'KeyVaultId'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CertificateCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CertificateCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CertificateCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.CertificateCollection"]: + """Get all certificates in a resource group. + + Description for Get all certificates in a resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CertificateCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CertificateCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CertificateCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + + async def get( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.Certificate": + """Get a certificate. + + Description for Get a certificate. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Certificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Certificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + name: str, + certificate_envelope: "_models.Certificate", + **kwargs + ) -> "_models.Certificate": + """Create or update a certificate. + + Description for Create or update a certificate. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate. + :type name: str + :param certificate_envelope: Details of certificate, if it exists already. + :type certificate_envelope: ~azure.mgmt.web.v2020_12_01.models.Certificate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Certificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(certificate_envelope, 'Certificate') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Certificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Delete a certificate. + + Description for Delete a certificate. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + + async def update( + self, + resource_group_name: str, + name: str, + certificate_envelope: "_models.CertificatePatchResource", + **kwargs + ) -> "_models.Certificate": + """Create or update a certificate. + + Description for Create or update a certificate. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate. + :type name: str + :param certificate_envelope: Details of certificate, if it exists already. + :type certificate_envelope: ~azure.mgmt.web.v2020_12_01.models.CertificatePatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Certificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Certificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_deleted_web_apps_operations.py new file mode 100644 index 000000000000..79ad86e6f228 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_deleted_web_apps_operations.py @@ -0,0 +1,245 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DeletedWebAppsOperations: + """DeletedWebAppsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.DeletedWebAppCollection"]: + """Get all deleted apps for a subscription. + + Description for Get all deleted apps for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeletedWebAppCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DeletedWebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DeletedWebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + + def list_by_location( + self, + location: str, + **kwargs + ) -> AsyncIterable["_models.DeletedWebAppCollection"]: + """Get all deleted apps for a subscription at location. + + Description for Get all deleted apps for a subscription at location. + + :param location: + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeletedWebAppCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DeletedWebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DeletedWebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + + async def get_deleted_web_app_by_location( + self, + location: str, + deleted_site_id: str, + **kwargs + ) -> "_models.DeletedSite": + """Get deleted app for a subscription at location. + + Description for Get deleted app for a subscription at location. + + :param location: + :type location: str + :param deleted_site_id: The numeric ID of the deleted app, e.g. 12345. + :type deleted_site_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeletedSite, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeletedSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_deleted_web_app_by_location.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'deletedSiteId': self._serialize.url("deleted_site_id", deleted_site_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeletedSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_diagnostics_operations.py new file mode 100644 index 000000000000..a38dc9cadd8e --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_diagnostics_operations.py @@ -0,0 +1,1774 @@ +# 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 datetime +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DiagnosticsOperations: + """DiagnosticsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_hosting_environment_detector_responses( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.DetectorResponseCollection"]: + """List Hosting Environment Detector Responses. + + Description for List Hosting Environment Detector Responses. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site Name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DetectorResponseCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_hosting_environment_detector_responses.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DetectorResponseCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + + async def get_hosting_environment_detector_response( + self, + resource_group_name: str, + name: str, + detector_name: str, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + time_grain: Optional[str] = None, + **kwargs + ) -> "_models.DetectorResponse": + """Get Hosting Environment Detector Response. + + Description for Get Hosting Environment Detector Response. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: App Service Environment Name. + :type name: str + :param detector_name: Detector Resource Name. + :type detector_name: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_hosting_environment_detector_response.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + + def list_site_detector_responses( + self, + resource_group_name: str, + site_name: str, + **kwargs + ) -> AsyncIterable["_models.DetectorResponseCollection"]: + """List Site Detector Responses. + + Description for List Site Detector Responses. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DetectorResponseCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_detector_responses.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DetectorResponseCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + + async def get_site_detector_response( + self, + resource_group_name: str, + site_name: str, + detector_name: str, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + time_grain: Optional[str] = None, + **kwargs + ) -> "_models.DetectorResponse": + """Get site detector response. + + Description for Get site detector response. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param detector_name: Detector Resource Name. + :type detector_name: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_detector_response.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + + def list_site_diagnostic_categories( + self, + resource_group_name: str, + site_name: str, + **kwargs + ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: + """Get Diagnostics Categories. + + Description for Get Diagnostics Categories. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticCategoryCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticCategoryCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + + async def get_site_diagnostic_category( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + **kwargs + ) -> "_models.DiagnosticCategory": + """Get Diagnostics Category. + + Description for Get Diagnostics Category. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticCategory, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_diagnostic_category.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticCategory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + + def list_site_analyses( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + **kwargs + ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: + """Get Site Analyses. + + Description for Get Site Analyses. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticAnalysisCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysisCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_analyses.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticAnalysisCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + + async def get_site_analysis( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + analysis_name: str, + **kwargs + ) -> "_models.AnalysisDefinition": + """Get Site Analysis. + + Description for Get Site Analysis. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param analysis_name: Analysis Name. + :type analysis_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AnalysisDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalysisDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_analysis.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AnalysisDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + + async def execute_site_analysis( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + analysis_name: str, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + time_grain: Optional[str] = None, + **kwargs + ) -> "_models.DiagnosticAnalysis": + """Execute Analysis. + + Description for Execute Analysis. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Category Name. + :type diagnostic_category: str + :param analysis_name: Analysis Resource Name. + :type analysis_name: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticAnalysis, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysis + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysis"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.execute_site_analysis.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + + def list_site_detectors( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + **kwargs + ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: + """Get Detectors. + + Description for Get Detectors. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticDetectorCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_detectors.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticDetectorCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + + async def get_site_detector( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + detector_name: str, + **kwargs + ) -> "_models.DetectorDefinition": + """Get Detector. + + Description for Get Detector. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param detector_name: Detector Name. + :type detector_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_detector.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + + async def execute_site_detector( + self, + resource_group_name: str, + site_name: str, + detector_name: str, + diagnostic_category: str, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + time_grain: Optional[str] = None, + **kwargs + ) -> "_models.DiagnosticDetectorResponse": + """Execute Detector. + + Description for Execute Detector. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param detector_name: Detector Resource Name. + :type detector_name: str + :param diagnostic_category: Category Name. + :type diagnostic_category: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticDetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.execute_site_detector.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + + def list_site_detector_responses_slot( + self, + resource_group_name: str, + site_name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.DetectorResponseCollection"]: + """List Site Detector Responses. + + Description for List Site Detector Responses. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DetectorResponseCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_detector_responses_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DetectorResponseCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + + async def get_site_detector_response_slot( + self, + resource_group_name: str, + site_name: str, + detector_name: str, + slot: str, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + time_grain: Optional[str] = None, + **kwargs + ) -> "_models.DetectorResponse": + """Get site detector response. + + Description for Get site detector response. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param detector_name: Detector Resource Name. + :type detector_name: str + :param slot: Slot Name. + :type slot: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_detector_response_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + + def list_site_diagnostic_categories_slot( + self, + resource_group_name: str, + site_name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: + """Get Diagnostics Categories. + + Description for Get Diagnostics Categories. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticCategoryCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticCategoryCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + + async def get_site_diagnostic_category_slot( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + slot: str, + **kwargs + ) -> "_models.DiagnosticCategory": + """Get Diagnostics Category. + + Description for Get Diagnostics Category. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticCategory, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_diagnostic_category_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticCategory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + + def list_site_analyses_slot( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: + """Get Site Analyses. + + Description for Get Site Analyses. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticAnalysisCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysisCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_analyses_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticAnalysisCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + + async def get_site_analysis_slot( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + analysis_name: str, + slot: str, + **kwargs + ) -> "_models.AnalysisDefinition": + """Get Site Analysis. + + Description for Get Site Analysis. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param analysis_name: Analysis Name. + :type analysis_name: str + :param slot: Slot - optional. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AnalysisDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalysisDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_analysis_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AnalysisDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + + async def execute_site_analysis_slot( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + analysis_name: str, + slot: str, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + time_grain: Optional[str] = None, + **kwargs + ) -> "_models.DiagnosticAnalysis": + """Execute Analysis. + + Description for Execute Analysis. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Category Name. + :type diagnostic_category: str + :param analysis_name: Analysis Resource Name. + :type analysis_name: str + :param slot: Slot Name. + :type slot: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticAnalysis, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysis + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysis"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.execute_site_analysis_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + + def list_site_detectors_slot( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: + """Get Detectors. + + Description for Get Detectors. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticDetectorCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_detectors_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticDetectorCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + + async def get_site_detector_slot( + self, + resource_group_name: str, + site_name: str, + diagnostic_category: str, + detector_name: str, + slot: str, + **kwargs + ) -> "_models.DetectorDefinition": + """Get Detector. + + Description for Get Detector. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param detector_name: Detector Name. + :type detector_name: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_detector_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + + async def execute_site_detector_slot( + self, + resource_group_name: str, + site_name: str, + detector_name: str, + diagnostic_category: str, + slot: str, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + time_grain: Optional[str] = None, + **kwargs + ) -> "_models.DiagnosticDetectorResponse": + """Execute Detector. + + Description for Execute Detector. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param detector_name: Detector Resource Name. + :type detector_name: str + :param diagnostic_category: Category Name. + :type diagnostic_category: str + :param slot: Slot Name. + :type slot: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticDetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.execute_site_detector_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domain_registration_provider_operations.py new file mode 100644 index 000000000000..22a732c11d80 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domain_registration_provider_operations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DomainRegistrationProviderOperations: + """DomainRegistrationProviderOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_operations( + self, + **kwargs + ) -> AsyncIterable["_models.CsmOperationCollection"]: + """Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + + Description for Implements Csm operations Api to exposes the list of available Csm Apis under + the resource provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmOperationCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CsmOperationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domains_operations.py new file mode 100644 index 000000000000..46d8199f4153 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domains_operations.py @@ -0,0 +1,1119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DomainsOperations: + """DomainsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def check_availability( + self, + identifier: "_models.NameIdentifier", + **kwargs + ) -> "_models.DomainAvailabilityCheckResult": + """Check if a domain is available for registration. + + Description for Check if a domain is available for registration. + + :param identifier: Name of the domain. + :type identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DomainAvailabilityCheckResult, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainAvailabilityCheckResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainAvailabilityCheckResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(identifier, 'NameIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DomainAvailabilityCheckResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.DomainCollection"]: + """Get all domains in a subscription. + + Description for Get all domains in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DomainCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DomainCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + + async def get_control_center_sso_request( + self, + **kwargs + ) -> "_models.DomainControlCenterSsoRequest": + """Generate a single sign-on request for the domain management portal. + + Description for Generate a single sign-on request for the domain management portal. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DomainControlCenterSsoRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainControlCenterSsoRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainControlCenterSsoRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_control_center_sso_request.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DomainControlCenterSsoRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + + def list_recommendations( + self, + parameters: "_models.DomainRecommendationSearchParameters", + **kwargs + ) -> AsyncIterable["_models.NameIdentifierCollection"]: + """Get domain name recommendations based on keywords. + + Description for Get domain name recommendations based on keywords. + + :param parameters: Search parameters for domain name recommendations. + :type parameters: ~azure.mgmt.web.v2020_12_01.models.DomainRecommendationSearchParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NameIdentifierCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.NameIdentifierCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_recommendations.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NameIdentifierCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.DomainCollection"]: + """Get all domains in a resource group. + + Description for Get all domains in a resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DomainCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DomainCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + + async def get( + self, + resource_group_name: str, + domain_name: str, + **kwargs + ) -> "_models.Domain": + """Get a domain. + + Description for Get a domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Domain, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Domain + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Domain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + domain_name: str, + domain: "_models.Domain", + **kwargs + ) -> "_models.Domain": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain, 'Domain') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Domain', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Domain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + domain_name: str, + domain: "_models.Domain", + **kwargs + ) -> AsyncLROPoller["_models.Domain"]: + """Creates or updates a domain. + + Description for Creates or updates a domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :param domain: Domain registration information. + :type domain: ~azure.mgmt.web.v2020_12_01.models.Domain + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Domain or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.Domain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain=domain, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Domain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + domain_name: str, + force_hard_delete_domain: Optional[bool] = None, + **kwargs + ) -> None: + """Delete a domain. + + Description for Delete a domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :param force_hard_delete_domain: Specify :code:`true` to delete the domain + immediately. The default is :code:`false` which deletes the domain after 24 hours. + :type force_hard_delete_domain: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if force_hard_delete_domain is not None: + query_parameters['forceHardDeleteDomain'] = self._serialize.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + domain_name: str, + domain: "_models.DomainPatchResource", + **kwargs + ) -> "_models.Domain": + """Creates or updates a domain. + + Description for Creates or updates a domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :param domain: Domain registration information. + :type domain: ~azure.mgmt.web.v2020_12_01.models.DomainPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Domain, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Domain + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain, 'DomainPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Domain', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Domain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + + def list_ownership_identifiers( + self, + resource_group_name: str, + domain_name: str, + **kwargs + ) -> AsyncIterable["_models.DomainOwnershipIdentifierCollection"]: + """Lists domain ownership identifiers. + + Description for Lists domain ownership identifiers. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of domain. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DomainOwnershipIdentifierCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifierCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_ownership_identifiers.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DomainOwnershipIdentifierCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + + async def get_ownership_identifier( + self, + resource_group_name: str, + domain_name: str, + name: str, + **kwargs + ) -> "_models.DomainOwnershipIdentifier": + """Get ownership identifier for domain. + + Description for Get ownership identifier for domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of domain. + :type domain_name: str + :param name: Name of identifier. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DomainOwnershipIdentifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + + async def create_or_update_ownership_identifier( + self, + resource_group_name: str, + domain_name: str, + name: str, + domain_ownership_identifier: "_models.DomainOwnershipIdentifier", + **kwargs + ) -> "_models.DomainOwnershipIdentifier": + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. + + Description for Creates an ownership identifier for a domain or updates identifier details for + an existing identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of domain. + :type domain_name: str + :param name: Name of identifier. + :type name: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DomainOwnershipIdentifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + + async def delete_ownership_identifier( + self, + resource_group_name: str, + domain_name: str, + name: str, + **kwargs + ) -> None: + """Delete ownership identifier for domain. + + Description for Delete ownership identifier for domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of domain. + :type domain_name: str + :param name: Name of identifier. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + + async def update_ownership_identifier( + self, + resource_group_name: str, + domain_name: str, + name: str, + domain_ownership_identifier: "_models.DomainOwnershipIdentifier", + **kwargs + ) -> "_models.DomainOwnershipIdentifier": + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. + + Description for Creates an ownership identifier for a domain or updates identifier details for + an existing identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of domain. + :type domain_name: str + :param name: Name of identifier. + :type name: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DomainOwnershipIdentifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + + async def renew( + self, + resource_group_name: str, + domain_name: str, + **kwargs + ) -> None: + """Renew a domain. + + Description for Renew a domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.renew.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_global_model_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_global_model_operations.py new file mode 100644 index 000000000000..60469e221da0 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_global_model_operations.py @@ -0,0 +1,213 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class GlobalOperations: + """GlobalOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get_deleted_web_app( + self, + deleted_site_id: str, + **kwargs + ) -> "_models.DeletedSite": + """Get deleted app for a subscription. + + Description for Get deleted app for a subscription. + + :param deleted_site_id: The numeric ID of the deleted app, e.g. 12345. + :type deleted_site_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeletedSite, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeletedSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_deleted_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'deletedSiteId': self._serialize.url("deleted_site_id", deleted_site_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeletedSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} # type: ignore + + async def get_deleted_web_app_snapshots( + self, + deleted_site_id: str, + **kwargs + ) -> List["_models.Snapshot"]: + """Get all deleted apps for a subscription. + + Description for Get all deleted apps for a subscription. + + :param deleted_site_id: The numeric ID of the deleted app, e.g. 12345. + :type deleted_site_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of Snapshot, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.Snapshot] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.Snapshot"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_deleted_web_app_snapshots.metadata['url'] # type: ignore + path_format_arguments = { + 'deletedSiteId': self._serialize.url("deleted_site_id", deleted_site_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[Snapshot]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} # type: ignore + + async def get_subscription_operation_with_async_response( + self, + location: str, + operation_id: str, + **kwargs + ) -> None: + """Gets an operation in a subscription and given region. + + Description for Gets an operation in a subscription and given region. + + :param location: Location name. + :type location: str + :param operation_id: Operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_subscription_operation_with_async_response.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_provider_operations.py new file mode 100644 index 000000000000..bbaa4353b667 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_provider_operations.py @@ -0,0 +1,546 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ProviderOperations: + """ProviderOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_available_stacks( + self, + os_type_selected: Optional[Union[str, "_models.Enum4"]] = None, + **kwargs + ) -> AsyncIterable["_models.ApplicationStackCollection"]: + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their versions. + + :param os_type_selected: + :type os_type_selected: str or ~azure.mgmt.web.v2020_12_01.models.Enum4 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationStackCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_available_stacks.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if os_type_selected is not None: + query_parameters['osTypeSelected'] = self._serialize.query("os_type_selected", os_type_selected, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + + def get_function_app_stacks( + self, + stack_os_type: Optional[Union[str, "_models.Enum5"]] = None, + **kwargs + ) -> AsyncIterable["_models.FunctionAppStackCollection"]: + """Get available Function app frameworks and their versions. + + Description for Get available Function app frameworks and their versions. + + :param stack_os_type: Stack OS Type. + :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum5 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FunctionAppStackCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_function_app_stacks.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if stack_os_type is not None: + query_parameters['stackOsType'] = self._serialize.query("stack_os_type", stack_os_type, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('FunctionAppStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} # type: ignore + + def get_function_app_stacks_for_location( + self, + location: str, + stack_os_type: Optional[Union[str, "_models.Enum6"]] = None, + **kwargs + ) -> AsyncIterable["_models.FunctionAppStackCollection"]: + """Get available Function app frameworks and their versions for location. + + Description for Get available Function app frameworks and their versions for location. + + :param location: Function App stack location. + :type location: str + :param stack_os_type: Stack OS Type. + :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum6 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FunctionAppStackCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_function_app_stacks_for_location.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if stack_os_type is not None: + query_parameters['stackOsType'] = self._serialize.query("stack_os_type", stack_os_type, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('FunctionAppStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} # type: ignore + + def get_web_app_stacks_for_location( + self, + location: str, + stack_os_type: Optional[Union[str, "_models.Enum7"]] = None, + **kwargs + ) -> AsyncIterable["_models.WebAppStackCollection"]: + """Get available Web app frameworks and their versions for location. + + Description for Get available Web app frameworks and their versions for location. + + :param location: Web App stack location. + :type location: str + :param stack_os_type: Stack OS Type. + :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum7 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppStackCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_web_app_stacks_for_location.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if stack_os_type is not None: + query_parameters['stackOsType'] = self._serialize.query("stack_os_type", stack_os_type, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} # type: ignore + + def list_operations( + self, + **kwargs + ) -> AsyncIterable["_models.CsmOperationCollection"]: + """Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + + Description for Gets all available operations for the Microsoft.Web resource provider. Also + exposes resource metric definitions. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmOperationCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CsmOperationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + + def get_web_app_stacks( + self, + stack_os_type: Optional[Union[str, "_models.Enum8"]] = None, + **kwargs + ) -> AsyncIterable["_models.WebAppStackCollection"]: + """Get available Web app frameworks and their versions. + + Description for Get available Web app frameworks and their versions. + + :param stack_os_type: Stack OS Type. + :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum8 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppStackCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_web_app_stacks.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if stack_os_type is not None: + query_parameters['stackOsType'] = self._serialize.query("stack_os_type", stack_os_type, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} # type: ignore + + def get_available_stacks_on_prem( + self, + os_type_selected: Optional[Union[str, "_models.Enum9"]] = None, + **kwargs + ) -> AsyncIterable["_models.ApplicationStackCollection"]: + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their versions. + + :param os_type_selected: + :type os_type_selected: str or ~azure.mgmt.web.v2020_12_01.models.Enum9 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationStackCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_available_stacks_on_prem.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if os_type_selected is not None: + query_parameters['osTypeSelected'] = self._serialize.query("os_type_selected", os_type_selected, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_recommendations_operations.py new file mode 100644 index 000000000000..38ec856e0ef2 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_recommendations_operations.py @@ -0,0 +1,1109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RecommendationsOperations: + """RecommendationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + featured: Optional[bool] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.RecommendationCollection"]: + """List all recommendations for a subscription. + + Description for List all recommendations for a subscription. + + :param featured: Specify :code:`true` to return only the most critical + recommendations. The default is :code:`false`, which returns all recommendations. + :type featured: bool + :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or + channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecommendationCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if featured is not None: + query_parameters['featured'] = self._serialize.query("featured", featured, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RecommendationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + + async def reset_all_filters( + self, + **kwargs + ) -> None: + """Reset all recommendation opt-out settings for a subscription. + + Description for Reset all recommendation opt-out settings for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reset_all_filters.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + + async def disable_recommendation_for_subscription( + self, + name: str, + **kwargs + ) -> None: + """Disables the specified rule so it will not apply to a subscription in the future. + + Description for Disables the specified rule so it will not apply to a subscription in the + future. + + :param name: Rule name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.disable_recommendation_for_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + + def list_history_for_hosting_environment( + self, + resource_group_name: str, + hosting_environment_name: str, + expired_only: Optional[bool] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.RecommendationCollection"]: + """Get past recommendations for an app, optionally specified by the time range. + + Description for Get past recommendations for an app, optionally specified by the time range. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param hosting_environment_name: Name of the hosting environment. + :type hosting_environment_name: str + :param expired_only: Specify :code:`false` to return all recommendations. The + default is :code:`true`, which returns only expired recommendations. + :type expired_only: bool + :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or + channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecommendationCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_history_for_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if expired_only is not None: + query_parameters['expiredOnly'] = self._serialize.query("expired_only", expired_only, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RecommendationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + + def list_recommended_rules_for_hosting_environment( + self, + resource_group_name: str, + hosting_environment_name: str, + featured: Optional[bool] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.RecommendationCollection"]: + """Get all recommendations for a hosting environment. + + Description for Get all recommendations for a hosting environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param hosting_environment_name: Name of the app. + :type hosting_environment_name: str + :param featured: Specify :code:`true` to return only the most critical + recommendations. The default is :code:`false`, which returns all recommendations. + :type featured: bool + :param filter: Return only channels specified in the filter. Filter is specified by using OData + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecommendationCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if featured is not None: + query_parameters['featured'] = self._serialize.query("featured", featured, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RecommendationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + + async def disable_all_for_hosting_environment( + self, + resource_group_name: str, + environment_name: str, + hosting_environment_name: str, + **kwargs + ) -> None: + """Disable all recommendations for an app. + + Description for Disable all recommendations for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param environment_name: Name of the app. + :type environment_name: str + :param hosting_environment_name: + :type hosting_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.disable_all_for_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + + async def reset_all_filters_for_hosting_environment( + self, + resource_group_name: str, + environment_name: str, + hosting_environment_name: str, + **kwargs + ) -> None: + """Reset all recommendation opt-out settings for an app. + + Description for Reset all recommendation opt-out settings for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param environment_name: Name of the app. + :type environment_name: str + :param hosting_environment_name: + :type hosting_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reset_all_filters_for_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + + async def get_rule_details_by_hosting_environment( + self, + resource_group_name: str, + hosting_environment_name: str, + name: str, + update_seen: Optional[bool] = None, + recommendation_id: Optional[str] = None, + **kwargs + ) -> "_models.RecommendationRule": + """Get a recommendation rule for an app. + + Description for Get a recommendation rule for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param hosting_environment_name: Name of the hosting environment. + :type hosting_environment_name: str + :param name: Name of the recommendation. + :type name: str + :param update_seen: Specify :code:`true` to update the last-seen timestamp of the + recommendation object. + :type update_seen: bool + :param recommendation_id: The GUID of the recommendation object if you query an expired one. + You don't need to specify it to query an active entry. + :type recommendation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RecommendationRule, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RecommendationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_rule_details_by_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if update_seen is not None: + query_parameters['updateSeen'] = self._serialize.query("update_seen", update_seen, 'bool') + if recommendation_id is not None: + query_parameters['recommendationId'] = self._serialize.query("recommendation_id", recommendation_id, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RecommendationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + + async def disable_recommendation_for_hosting_environment( + self, + resource_group_name: str, + environment_name: str, + name: str, + hosting_environment_name: str, + **kwargs + ) -> None: + """Disables the specific rule for a web site permanently. + + Description for Disables the specific rule for a web site permanently. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param environment_name: Site name. + :type environment_name: str + :param name: Rule name. + :type name: str + :param hosting_environment_name: + :type hosting_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.disable_recommendation_for_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + + def list_history_for_web_app( + self, + resource_group_name: str, + site_name: str, + expired_only: Optional[bool] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.RecommendationCollection"]: + """Get past recommendations for an app, optionally specified by the time range. + + Description for Get past recommendations for an app, optionally specified by the time range. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Name of the app. + :type site_name: str + :param expired_only: Specify :code:`false` to return all recommendations. The + default is :code:`true`, which returns only expired recommendations. + :type expired_only: bool + :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or + channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecommendationCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_history_for_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if expired_only is not None: + query_parameters['expiredOnly'] = self._serialize.query("expired_only", expired_only, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RecommendationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + + def list_recommended_rules_for_web_app( + self, + resource_group_name: str, + site_name: str, + featured: Optional[bool] = None, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.RecommendationCollection"]: + """Get all recommendations for an app. + + Description for Get all recommendations for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Name of the app. + :type site_name: str + :param featured: Specify :code:`true` to return only the most critical + recommendations. The default is :code:`false`, which returns all recommendations. + :type featured: bool + :param filter: Return only channels specified in the filter. Filter is specified by using OData + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecommendationCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if featured is not None: + query_parameters['featured'] = self._serialize.query("featured", featured, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RecommendationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + + async def disable_all_for_web_app( + self, + resource_group_name: str, + site_name: str, + **kwargs + ) -> None: + """Disable all recommendations for an app. + + Description for Disable all recommendations for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Name of the app. + :type site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.disable_all_for_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + + async def reset_all_filters_for_web_app( + self, + resource_group_name: str, + site_name: str, + **kwargs + ) -> None: + """Reset all recommendation opt-out settings for an app. + + Description for Reset all recommendation opt-out settings for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Name of the app. + :type site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reset_all_filters_for_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + + async def get_rule_details_by_web_app( + self, + resource_group_name: str, + site_name: str, + name: str, + update_seen: Optional[bool] = None, + recommendation_id: Optional[str] = None, + **kwargs + ) -> "_models.RecommendationRule": + """Get a recommendation rule for an app. + + Description for Get a recommendation rule for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Name of the app. + :type site_name: str + :param name: Name of the recommendation. + :type name: str + :param update_seen: Specify :code:`true` to update the last-seen timestamp of the + recommendation object. + :type update_seen: bool + :param recommendation_id: The GUID of the recommendation object if you query an expired one. + You don't need to specify it to query an active entry. + :type recommendation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RecommendationRule, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RecommendationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_rule_details_by_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if update_seen is not None: + query_parameters['updateSeen'] = self._serialize.query("update_seen", update_seen, 'bool') + if recommendation_id is not None: + query_parameters['recommendationId'] = self._serialize.query("recommendation_id", recommendation_id, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RecommendationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + + async def disable_recommendation_for_site( + self, + resource_group_name: str, + site_name: str, + name: str, + **kwargs + ) -> None: + """Disables the specific rule for a web site permanently. + + Description for Disables the specific rule for a web site permanently. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site name. + :type site_name: str + :param name: Rule name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.disable_recommendation_for_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_resource_health_metadata_operations.py new file mode 100644 index 000000000000..8a92ed4b8464 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_resource_health_metadata_operations.py @@ -0,0 +1,471 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResourceHealthMetadataOperations: + """ResourceHealthMetadataOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: + """List all ResourceHealthMetadata for all sites in the subscription. + + Description for List all ResourceHealthMetadata for all sites in the subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceHealthMetadataCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: + """List all ResourceHealthMetadata for all sites in the resource group in the subscription. + + Description for List all ResourceHealthMetadata for all sites in the resource group in the + subscription. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceHealthMetadataCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + + def list_by_site( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: + """Gets the category of ResourceHealthMetadata to use for the given site as a collection. + + Description for Gets the category of ResourceHealthMetadata to use for the given site as a + collection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceHealthMetadataCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + + async def get_by_site( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.ResourceHealthMetadata": + """Gets the category of ResourceHealthMetadata to use for the given site. + + Description for Gets the category of ResourceHealthMetadata to use for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceHealthMetadata, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadata"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_by_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + + def list_by_site_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: + """Gets the category of ResourceHealthMetadata to use for the given site as a collection. + + Description for Gets the category of ResourceHealthMetadata to use for the given site as a + collection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_site_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceHealthMetadataCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + + async def get_by_site_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.ResourceHealthMetadata": + """Gets the category of ResourceHealthMetadata to use for the given site. + + Description for Gets the category of ResourceHealthMetadata to use for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceHealthMetadata, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadata"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_by_site_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_static_sites_operations.py new file mode 100644 index 000000000000..9cb9b0260f63 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_static_sites_operations.py @@ -0,0 +1,4156 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class StaticSitesOperations: + """StaticSitesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def preview_workflow( + self, + location: str, + static_sites_workflow_preview_request: "_models.StaticSitesWorkflowPreviewRequest", + **kwargs + ) -> "_models.StaticSitesWorkflowPreview": + """Generates a preview workflow file for the static site. + + Description for Generates a preview workflow file for the static site. + + :param location: Location where you plan to create the static site. + :type location: str + :param static_sites_workflow_preview_request: A JSON representation of the + StaticSitesWorkflowPreviewRequest properties. See example. + :type static_sites_workflow_preview_request: ~azure.mgmt.web.v2020_12_01.models.StaticSitesWorkflowPreviewRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSitesWorkflowPreview, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSitesWorkflowPreview + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSitesWorkflowPreview"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.preview_workflow.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSitesWorkflowPreview', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.StaticSiteCollection"]: + """Get all Static Sites for a subscription. + + Description for Get all Static Sites for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + + def get_static_sites_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.StaticSiteCollection"]: + """Gets all static sites in the specified resource group. + + Description for Gets all static sites in the specified resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_static_sites_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + + async def get_static_site( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.StaticSiteARMResource": + """Gets the details of a static site. + + Description for Gets the details of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_static_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + async def _create_or_update_static_site_initial( + self, + resource_group_name: str, + name: str, + static_site_envelope: "_models.StaticSiteARMResource", + **kwargs + ) -> "_models.StaticSiteARMResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + async def begin_create_or_update_static_site( + self, + resource_group_name: str, + name: str, + static_site_envelope: "_models.StaticSiteARMResource", + **kwargs + ) -> AsyncLROPoller["_models.StaticSiteARMResource"]: + """Creates a new static site in an existing resource group, or updates an existing static site. + + Description for Creates a new static site in an existing resource group, or updates an existing + static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site to create or update. + :type name: str + :param static_site_envelope: A JSON representation of the staticsite properties. See example. + :type static_site_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either StaticSiteARMResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_static_site_initial( + resource_group_name=resource_group_name, + name=name, + static_site_envelope=static_site_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + async def _delete_static_site_initial( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + async def begin_delete_static_site( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes a static site. + + Description for Deletes a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site to delete. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_static_site_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + async def update_static_site( + self, + resource_group_name: str, + name: str, + static_site_envelope: "_models.StaticSitePatchResource", + **kwargs + ) -> "_models.StaticSiteARMResource": + """Creates a new static site in an existing resource group, or updates an existing static site. + + Description for Creates a new static site in an existing resource group, or updates an existing + static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site to create or update. + :type name: str + :param static_site_envelope: A JSON representation of the staticsite properties. See example. + :type static_site_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSitePatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_static_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + def list_static_site_users( + self, + resource_group_name: str, + name: str, + authprovider: str, + **kwargs + ) -> AsyncIterable["_models.StaticSiteUserCollection"]: + """Gets the list of users of a static site. + + Description for Gets the list of users of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param authprovider: The auth provider for the users. + :type authprovider: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteUserCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_static_site_users.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'authprovider': self._serialize.url("authprovider", authprovider, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteUserCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + + async def delete_static_site_user( + self, + resource_group_name: str, + name: str, + authprovider: str, + userid: str, + **kwargs + ) -> None: + """Deletes the user entry from the static site. + + Description for Deletes the user entry from the static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the staticsite. + :type name: str + :param authprovider: The auth provider for this user. + :type authprovider: str + :param userid: The user id of the user. + :type userid: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_static_site_user.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'authprovider': self._serialize.url("authprovider", authprovider, 'str'), + 'userid': self._serialize.url("userid", userid, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + + async def update_static_site_user( + self, + resource_group_name: str, + name: str, + authprovider: str, + userid: str, + static_site_user_envelope: "_models.StaticSiteUserARMResource", + **kwargs + ) -> "_models.StaticSiteUserARMResource": + """Updates a user entry with the listed roles. + + Description for Updates a user entry with the listed roles. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param authprovider: The auth provider for this user. + :type authprovider: str + :param userid: The user id of the user. + :type userid: str + :param static_site_user_envelope: A JSON representation of the StaticSiteUser properties. See + example. + :type static_site_user_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteUserARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_static_site_user.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'authprovider': self._serialize.url("authprovider", authprovider, 'str'), + 'userid': self._serialize.url("userid", userid, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteUserARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + + def get_static_site_builds( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.StaticSiteBuildCollection"]: + """Gets all static site builds for a particular static site. + + Description for Gets all static site builds for a particular static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteBuildCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_static_site_builds.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteBuildCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + + async def get_static_site_build( + self, + resource_group_name: str, + name: str, + environment_name: str, + **kwargs + ) -> "_models.StaticSiteBuildARMResource": + """Gets the details of a static site build. + + Description for Gets the details of a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteBuildARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_static_site_build.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteBuildARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + + async def _delete_static_site_build_initial( + self, + resource_group_name: str, + name: str, + environment_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_static_site_build_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + + async def begin_delete_static_site_build( + self, + resource_group_name: str, + name: str, + environment_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes a static site build. + + Description for Deletes a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_static_site_build_initial( + resource_group_name=resource_group_name, + name=name, + environment_name=environment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + + async def create_or_update_static_site_build_app_settings( + self, + resource_group_name: str, + name: str, + environment_name: str, + app_settings: "_models.StringDictionary", + **kwargs + ) -> "_models.StringDictionary": + """Creates or updates the app settings of a static site build. + + Description for Creates or updates the app settings of a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :param app_settings: The dictionary containing the static site app settings to update. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_static_site_build_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings'} # type: ignore + + async def create_or_update_static_site_build_function_app_settings( + self, + resource_group_name: str, + name: str, + environment_name: str, + app_settings: "_models.StringDictionary", + **kwargs + ) -> "_models.StringDictionary": + """Creates or updates the function app settings of a static site build. + + Description for Creates or updates the function app settings of a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :param app_settings: The dictionary containing the static site function app settings to update. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_static_site_build_function_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings'} # type: ignore + + def list_static_site_build_functions( + self, + resource_group_name: str, + name: str, + environment_name: str, + **kwargs + ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: + """Gets the functions of a particular static site build. + + Description for Gets the functions of a particular static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteFunctionOverviewCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_static_site_build_functions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteFunctionOverviewCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} # type: ignore + + async def list_static_site_build_app_settings( + self, + resource_group_name: str, + name: str, + environment_name: str, + **kwargs + ) -> "_models.StringDictionary": + """Gets the application settings of a static site build. + + Description for Gets the application settings of a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_build_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} # type: ignore + + async def list_static_site_build_function_app_settings( + self, + resource_group_name: str, + name: str, + environment_name: str, + **kwargs + ) -> "_models.StringDictionary": + """Gets the application settings of a static site build. + + Description for Gets the application settings of a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_build_function_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} # type: ignore + + def get_user_provided_function_apps_for_static_site_build( + self, + resource_group_name: str, + name: str, + environment_name: str, + **kwargs + ) -> AsyncIterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: + """Gets the details of the user provided function apps registered with a static site build. + + Description for Gets the details of the user provided function apps registered with a static + site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteUserProvidedFunctionAppsCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppsCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_user_provided_function_apps_for_static_site_build.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppsCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} # type: ignore + + async def get_user_provided_function_app_for_static_site_build( + self, + resource_group_name: str, + name: str, + environment_name: str, + function_app_name: str, + **kwargs + ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": + """Gets the details of the user provided function app registered with a static site build. + + Description for Gets the details of the user provided function app registered with a static + site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :param function_app_name: Name of the function app registered with the static site build. + :type function_app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteUserProvidedFunctionAppARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_user_provided_function_app_for_static_site_build.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_user_provided_function_app_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + async def _register_user_provided_function_app_with_static_site_build_initial( + self, + resource_group_name: str, + name: str, + environment_name: str, + function_app_name: str, + static_site_user_provided_function_envelope: "_models.StaticSiteUserProvidedFunctionAppARMResource", + is_forced: Optional[bool] = None, + **kwargs + ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._register_user_provided_function_app_with_static_site_build_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if is_forced is not None: + query_parameters['isForced'] = self._serialize.query("is_forced", is_forced, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + async def begin_register_user_provided_function_app_with_static_site_build( + self, + resource_group_name: str, + name: str, + environment_name: str, + function_app_name: str, + static_site_user_provided_function_envelope: "_models.StaticSiteUserProvidedFunctionAppARMResource", + is_forced: Optional[bool] = None, + **kwargs + ) -> AsyncLROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: + """Register a user provided function app with a static site build. + + Description for Register a user provided function app with a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :param function_app_name: Name of the function app to register with the static site build. + :type function_app_name: str + :param static_site_user_provided_function_envelope: A JSON representation of the user provided + function app properties. See example. + :type static_site_user_provided_function_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource + :param is_forced: Specify :code:`true` to force the update of the auth + configuration on the function app even if an AzureStaticWebApps provider is already configured + on the function app. The default is :code:`false`. + :type is_forced: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either StaticSiteUserProvidedFunctionAppARMResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._register_user_provided_function_app_with_static_site_build_initial( + resource_group_name=resource_group_name, + name=name, + environment_name=environment_name, + function_app_name=function_app_name, + static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, + is_forced=is_forced, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + async def detach_user_provided_function_app_from_static_site_build( + self, + resource_group_name: str, + name: str, + environment_name: str, + function_app_name: str, + **kwargs + ) -> None: + """Detach the user provided function app from the static site build. + + Description for Detach the user provided function app from the static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :param function_app_name: Name of the function app registered with the static site build. + :type function_app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.detach_user_provided_function_app_from_static_site_build.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + async def _create_zip_deployment_for_static_site_build_initial( + self, + resource_group_name: str, + name: str, + environment_name: str, + static_site_zip_deployment_envelope: "_models.StaticSiteZipDeploymentARMResource", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_zip_deployment_for_static_site_build_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _create_zip_deployment_for_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + + async def begin_create_zip_deployment_for_static_site_build( + self, + resource_group_name: str, + name: str, + environment_name: str, + static_site_zip_deployment_envelope: "_models.StaticSiteZipDeploymentARMResource", + **kwargs + ) -> AsyncLROPoller[None]: + """Deploys zipped content to a specific environment of a static site. + + Description for Deploys zipped content to a specific environment of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: Name of the environment. + :type environment_name: str + :param static_site_zip_deployment_envelope: A JSON representation of the + StaticSiteZipDeployment properties. See example. + :type static_site_zip_deployment_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteZipDeploymentARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_zip_deployment_for_static_site_build_initial( + resource_group_name=resource_group_name, + name=name, + environment_name=environment_name, + static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + + async def create_or_update_static_site_app_settings( + self, + resource_group_name: str, + name: str, + app_settings: "_models.StringDictionary", + **kwargs + ) -> "_models.StringDictionary": + """Creates or updates the app settings of a static site. + + Description for Creates or updates the app settings of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param app_settings: The dictionary containing the static site app settings to update. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_static_site_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} # type: ignore + + async def create_or_update_static_site_function_app_settings( + self, + resource_group_name: str, + name: str, + app_settings: "_models.StringDictionary", + **kwargs + ) -> "_models.StringDictionary": + """Creates or updates the function app settings of a static site. + + Description for Creates or updates the function app settings of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param app_settings: The dictionary containing the static site function app settings to update. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_static_site_function_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + + async def create_user_roles_invitation_link( + self, + resource_group_name: str, + name: str, + static_site_user_roles_invitation_envelope: "_models.StaticSiteUserInvitationRequestResource", + **kwargs + ) -> "_models.StaticSiteUserInvitationResponseResource": + """Creates an invitation link for a user with the role. + + Description for Creates an invitation link for a user with the role. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param static_site_user_roles_invitation_envelope: + :type static_site_user_roles_invitation_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserInvitationRequestResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteUserInvitationResponseResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserInvitationResponseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserInvitationResponseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_user_roles_invitation_link.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + + def list_static_site_custom_domains( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.StaticSiteCustomDomainOverviewCollection"]: + """Gets all static site custom domains for a particular static site. + + Description for Gets all static site custom domains for a particular static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site resource to search in. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteCustomDomainOverviewCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_static_site_custom_domains.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteCustomDomainOverviewCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + + async def get_static_site_custom_domain( + self, + resource_group_name: str, + name: str, + domain_name: str, + **kwargs + ) -> "_models.StaticSiteCustomDomainOverviewARMResource": + """Gets an existing custom domain for a particular static site. + + Description for Gets an existing custom domain for a particular static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site resource to search in. + :type name: str + :param domain_name: The custom domain name. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteCustomDomainOverviewARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_static_site_custom_domain.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + + async def _create_or_update_static_site_custom_domain_initial( + self, + resource_group_name: str, + name: str, + domain_name: str, + static_site_custom_domain_request_properties_envelope: "_models.StaticSiteCustomDomainRequestPropertiesARMResource", + **kwargs + ) -> "_models.StaticSiteCustomDomainOverviewARMResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_static_site_custom_domain_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + + async def begin_create_or_update_static_site_custom_domain( + self, + resource_group_name: str, + name: str, + domain_name: str, + static_site_custom_domain_request_properties_envelope: "_models.StaticSiteCustomDomainRequestPropertiesARMResource", + **kwargs + ) -> AsyncLROPoller["_models.StaticSiteCustomDomainOverviewARMResource"]: + """Creates a new static site custom domain in an existing resource group and static site. + + Description for Creates a new static site custom domain in an existing resource group and + static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param domain_name: The custom domain to create. + :type domain_name: str + :param static_site_custom_domain_request_properties_envelope: A JSON representation of the + static site custom domain request properties. See example. + :type static_site_custom_domain_request_properties_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainRequestPropertiesARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either StaticSiteCustomDomainOverviewARMResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_static_site_custom_domain_initial( + resource_group_name=resource_group_name, + name=name, + domain_name=domain_name, + static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + + async def _delete_static_site_custom_domain_initial( + self, + resource_group_name: str, + name: str, + domain_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_static_site_custom_domain_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + + async def begin_delete_static_site_custom_domain( + self, + resource_group_name: str, + name: str, + domain_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes a custom domain. + + Description for Deletes a custom domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param domain_name: The custom domain to delete. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_static_site_custom_domain_initial( + resource_group_name=resource_group_name, + name=name, + domain_name=domain_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + + async def _validate_custom_domain_can_be_added_to_static_site_initial( + self, + resource_group_name: str, + name: str, + domain_name: str, + static_site_custom_domain_request_properties_envelope: "_models.StaticSiteCustomDomainRequestPropertiesARMResource", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._validate_custom_domain_can_be_added_to_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + + async def begin_validate_custom_domain_can_be_added_to_static_site( + self, + resource_group_name: str, + name: str, + domain_name: str, + static_site_custom_domain_request_properties_envelope: "_models.StaticSiteCustomDomainRequestPropertiesARMResource", + **kwargs + ) -> AsyncLROPoller[None]: + """Validates a particular custom domain can be added to a static site. + + Description for Validates a particular custom domain can be added to a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param domain_name: The custom domain to validate. + :type domain_name: str + :param static_site_custom_domain_request_properties_envelope: A JSON representation of the + static site custom domain request properties. See example. + :type static_site_custom_domain_request_properties_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainRequestPropertiesARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._validate_custom_domain_can_be_added_to_static_site_initial( + resource_group_name=resource_group_name, + name=name, + domain_name=domain_name, + static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + + async def _detach_static_site_initial( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._detach_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _detach_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + + async def begin_detach_static_site( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Detaches a static site. + + Description for Detaches a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site to detach. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._detach_static_site_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + + def list_static_site_functions( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: + """Gets the functions of a static site. + + Description for Gets the functions of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteFunctionOverviewCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_static_site_functions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteFunctionOverviewCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + + async def list_static_site_app_settings( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.StringDictionary": + """Gets the application settings of a static site. + + Description for Gets the application settings of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} # type: ignore + + async def list_static_site_configured_roles( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.StringList": + """Lists the roles configured for the static site. + + Description for Lists the roles configured for the static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringList, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_configured_roles.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} # type: ignore + + async def list_static_site_function_app_settings( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.StringDictionary": + """Gets the application settings of a static site. + + Description for Gets the application settings of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_function_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + + async def list_static_site_secrets( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.StringDictionary": + """Lists the secrets for an existing static site. + + Description for Lists the secrets for an existing static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_secrets.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + + def get_private_endpoint_connection_list( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: + """Gets the list of private endpoint connections associated with a static site. + + Description for Gets the list of private endpoint connections associated with a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} # type: ignore + + async def get_private_endpoint_connection( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> "_models.RemotePrivateEndpointConnectionARMResource": + """Gets a private endpoint connection. + + Description for Gets a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RemotePrivateEndpointConnectionARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _approve_or_reject_private_endpoint_connection_initial( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + private_endpoint_wrapper: "_models.PrivateLinkConnectionApprovalRequestResource", + **kwargs + ) -> "_models.RemotePrivateEndpointConnectionARMResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._approve_or_reject_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_approve_or_reject_private_endpoint_connection( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + private_endpoint_wrapper: "_models.PrivateLinkConnectionApprovalRequestResource", + **kwargs + ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: + """Approves or rejects a private endpoint connection. + + Description for Approves or rejects a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param private_endpoint_wrapper: Request body. + :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionApprovalRequestResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RemotePrivateEndpointConnectionARMResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._approve_or_reject_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_wrapper=private_endpoint_wrapper, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_private_endpoint_connection_initial( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> object: + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 204: + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete_private_endpoint_connection( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> AsyncLROPoller[object]: + """Deletes a private endpoint connection. + + Description for Deletes a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either object or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[object] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[object] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def get_private_link_resources( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.PrivateLinkResourcesWrapper": + """Gets the private link resources. + + Description for Gets the private link resources. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesWrapper, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesWrapper"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_link_resources.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} # type: ignore + + async def reset_static_site_api_key( + self, + resource_group_name: str, + name: str, + reset_properties_envelope: "_models.StaticSiteResetPropertiesARMResource", + **kwargs + ) -> None: + """Resets the api key for an existing static site. + + Description for Resets the api key for an existing static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param reset_properties_envelope: + :type reset_properties_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteResetPropertiesARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.reset_static_site_api_key.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + + def get_user_provided_function_apps_for_static_site( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: + """Gets the details of the user provided function apps registered with a static site. + + Description for Gets the details of the user provided function apps registered with a static + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteUserProvidedFunctionAppsCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppsCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_user_provided_function_apps_for_static_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppsCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} # type: ignore + + async def get_user_provided_function_app_for_static_site( + self, + resource_group_name: str, + name: str, + function_app_name: str, + **kwargs + ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": + """Gets the details of the user provided function app registered with a static site. + + Description for Gets the details of the user provided function app registered with a static + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param function_app_name: Name of the function app registered with the static site. + :type function_app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteUserProvidedFunctionAppARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_user_provided_function_app_for_static_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + async def _register_user_provided_function_app_with_static_site_initial( + self, + resource_group_name: str, + name: str, + function_app_name: str, + static_site_user_provided_function_envelope: "_models.StaticSiteUserProvidedFunctionAppARMResource", + is_forced: Optional[bool] = None, + **kwargs + ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._register_user_provided_function_app_with_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if is_forced is not None: + query_parameters['isForced'] = self._serialize.query("is_forced", is_forced, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _register_user_provided_function_app_with_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + async def begin_register_user_provided_function_app_with_static_site( + self, + resource_group_name: str, + name: str, + function_app_name: str, + static_site_user_provided_function_envelope: "_models.StaticSiteUserProvidedFunctionAppARMResource", + is_forced: Optional[bool] = None, + **kwargs + ) -> AsyncLROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: + """Register a user provided function app with a static site. + + Description for Register a user provided function app with a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param function_app_name: Name of the function app to register with the static site. + :type function_app_name: str + :param static_site_user_provided_function_envelope: A JSON representation of the user provided + function app properties. See example. + :type static_site_user_provided_function_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource + :param is_forced: Specify :code:`true` to force the update of the auth + configuration on the function app even if an AzureStaticWebApps provider is already configured + on the function app. The default is :code:`false`. + :type is_forced: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either StaticSiteUserProvidedFunctionAppARMResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._register_user_provided_function_app_with_static_site_initial( + resource_group_name=resource_group_name, + name=name, + function_app_name=function_app_name, + static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, + is_forced=is_forced, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + async def detach_user_provided_function_app_from_static_site( + self, + resource_group_name: str, + name: str, + function_app_name: str, + **kwargs + ) -> None: + """Detach the user provided function app from the static site. + + Description for Detach the user provided function app from the static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param function_app_name: Name of the function app registered with the static site. + :type function_app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.detach_user_provided_function_app_from_static_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + async def _create_zip_deployment_for_static_site_initial( + self, + resource_group_name: str, + name: str, + static_site_zip_deployment_envelope: "_models.StaticSiteZipDeploymentARMResource", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_zip_deployment_for_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _create_zip_deployment_for_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + + async def begin_create_zip_deployment_for_static_site( + self, + resource_group_name: str, + name: str, + static_site_zip_deployment_envelope: "_models.StaticSiteZipDeploymentARMResource", + **kwargs + ) -> AsyncLROPoller[None]: + """Deploys zipped content to a static site. + + Description for Deploys zipped content to a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param static_site_zip_deployment_envelope: A JSON representation of the + StaticSiteZipDeployment properties. See example. + :type static_site_zip_deployment_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteZipDeploymentARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_zip_deployment_for_static_site_initial( + resource_group_name=resource_group_name, + name=name, + static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_top_level_domains_operations.py new file mode 100644 index 000000000000..4e33bf7733bc --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_top_level_domains_operations.py @@ -0,0 +1,252 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class TopLevelDomainsOperations: + """TopLevelDomainsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.TopLevelDomainCollection"]: + """Get all top-level domains supported for registration. + + Description for Get all top-level domains supported for registration. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TopLevelDomainCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TopLevelDomainCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('TopLevelDomainCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + + async def get( + self, + name: str, + **kwargs + ) -> "_models.TopLevelDomain": + """Get details of a top-level domain. + + Description for Get details of a top-level domain. + + :param name: Name of the top-level domain. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TopLevelDomain, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.TopLevelDomain + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomain"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TopLevelDomain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + + def list_agreements( + self, + name: str, + agreement_option: "_models.TopLevelDomainAgreementOption", + **kwargs + ) -> AsyncIterable["_models.TldLegalAgreementCollection"]: + """Gets all legal agreements that user needs to accept before purchasing a domain. + + Description for Gets all legal agreements that user needs to accept before purchasing a domain. + + :param name: Name of the top-level domain. + :type name: str + :param agreement_option: Domain agreement options. + :type agreement_option: ~azure.mgmt.web.v2020_12_01.models.TopLevelDomainAgreementOption + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TldLegalAgreementCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TldLegalAgreementCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_agreements.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('TldLegalAgreementCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_apps_operations.py new file mode 100644 index 000000000000..f074d3905dab --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_apps_operations.py @@ -0,0 +1,29502 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WebAppsOperations: + """WebAppsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.WebAppCollection"]: + """Get all apps for a subscription. + + Description for Get all apps for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + include_slots: Optional[bool] = None, + **kwargs + ) -> AsyncIterable["_models.WebAppCollection"]: + """Gets all web, mobile, and API apps in the specified resource group. + + Description for Gets all web, mobile, and API apps in the specified resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param include_slots: Specify :code:`true` to include deployment slots in + results. The default is false, which only gives you the production slot of all apps. + :type include_slots: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if include_slots is not None: + query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + + async def get( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> Optional["_models.Site"]: + """Gets the details of a web, mobile, or API app. + + Description for Gets the details of a web, mobile, or API app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Site, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Site"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + name: str, + site_envelope: "_models.Site", + **kwargs + ) -> "_models.Site": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_envelope, 'Site') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + name: str, + site_envelope: "_models.Site", + **kwargs + ) -> AsyncLROPoller["_models.Site"]: + """Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + + Description for Creates a new web, mobile, or API app in an existing resource group, or updates + an existing app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Unique name of the app to create or update. To create or update a deployment slot, + use the {slot} parameter. + :type name: str + :param site_envelope: A JSON representation of the app properties. See example. + :type site_envelope: ~azure.mgmt.web.v2020_12_01.models.Site + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.Site] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + name: str, + delete_metrics: Optional[bool] = None, + delete_empty_server_farm: Optional[bool] = None, + **kwargs + ) -> None: + """Deletes a web, mobile, or API app, or one of the deployment slots. + + Description for Deletes a web, mobile, or API app, or one of the deployment slots. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app to delete. + :type name: str + :param delete_metrics: If true, web app metrics are also deleted. + :type delete_metrics: bool + :param delete_empty_server_farm: Specify false if you want to keep empty App Service plan. By + default, empty App Service plan is deleted. + :type delete_empty_server_farm: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if delete_metrics is not None: + query_parameters['deleteMetrics'] = self._serialize.query("delete_metrics", delete_metrics, 'bool') + if delete_empty_server_farm is not None: + query_parameters['deleteEmptyServerFarm'] = self._serialize.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + + async def update( + self, + resource_group_name: str, + name: str, + site_envelope: "_models.SitePatchResource", + **kwargs + ) -> "_models.Site": + """Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + + Description for Creates a new web, mobile, or API app in an existing resource group, or updates + an existing app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Unique name of the app to create or update. To create or update a deployment slot, + use the {slot} parameter. + :type name: str + :param site_envelope: A JSON representation of the app properties. See example. + :type site_envelope: ~azure.mgmt.web.v2020_12_01.models.SitePatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Site, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + + async def analyze_custom_hostname( + self, + resource_group_name: str, + name: str, + host_name: Optional[str] = None, + **kwargs + ) -> "_models.CustomHostnameAnalysisResult": + """Analyze a custom hostname. + + Description for Analyze a custom hostname. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param host_name: Custom hostname. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomHostnameAnalysisResult, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CustomHostnameAnalysisResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomHostnameAnalysisResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.analyze_custom_hostname.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + + async def apply_slot_config_to_production( + self, + resource_group_name: str, + name: str, + slot_swap_entity: "_models.CsmSlotEntity", + **kwargs + ) -> None: + """Applies the configuration settings from the target slot onto the current slot. + + Description for Applies the configuration settings from the target slot onto the current slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.apply_slot_config_to_production.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + + async def backup( + self, + resource_group_name: str, + name: str, + request: "_models.BackupRequest", + **kwargs + ) -> "_models.BackupItem": + """Creates a backup of an app. + + Description for Creates a backup of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param request: Backup configuration. You can use the JSON response from the POST action as + input here. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.backup.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + + def list_backups( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.BackupItemCollection"]: + """Gets existing backups of an app. + + Description for Gets existing backups of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupItemCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_backups.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BackupItemCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + + async def get_backup_status( + self, + resource_group_name: str, + name: str, + backup_id: str, + **kwargs + ) -> "_models.BackupItem": + """Gets a backup of an app by its ID. + + Description for Gets a backup of an app by its ID. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_backup_status.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + + async def delete_backup( + self, + resource_group_name: str, + name: str, + backup_id: str, + **kwargs + ) -> None: + """Deletes a backup of an app by its ID. + + Description for Deletes a backup of an app by its ID. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_backup.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + + async def list_backup_status_secrets( + self, + resource_group_name: str, + name: str, + backup_id: str, + request: "_models.BackupRequest", + **kwargs + ) -> "_models.BackupItem": + """Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + + Description for Gets status of a web app backup that may be in progress, including secrets + associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the + SAS URL for the backup if a new URL is passed in the request body. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param backup_id: ID of backup. + :type backup_id: str + :param request: Information on backup request. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_backup_status_secrets.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + + async def _restore_initial( + self, + resource_group_name: str, + name: str, + backup_id: str, + request: "_models.RestoreRequest", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + + async def begin_restore( + self, + resource_group_name: str, + name: str, + backup_id: str, + request: "_models.RestoreRequest", + **kwargs + ) -> AsyncLROPoller[None]: + """Restores a specific backup to another app (or deployment slot, if specified). + + Description for Restores a specific backup to another app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restore_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + + async def get_basic_publishing_credentials_policies( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.CsmPublishingCredentialsPoliciesCollection": + """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + + Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesCollection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_basic_publishing_credentials_policies.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + + async def get_ftp_allowed( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.CsmPublishingCredentialsPoliciesEntity": + """Returns whether FTP is allowed on the site or not. + + Description for Returns whether FTP is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ftp_allowed.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + + async def update_ftp_allowed( + self, + resource_group_name: str, + name: str, + csm_publishing_access_policies_entity: "_models.CsmPublishingCredentialsPoliciesEntity", + **kwargs + ) -> "_models.CsmPublishingCredentialsPoliciesEntity": + """Updates whether FTP is allowed on the site or not. + + Description for Updates whether FTP is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param csm_publishing_access_policies_entity: + :type csm_publishing_access_policies_entity: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_ftp_allowed.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + + async def get_scm_allowed( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.CsmPublishingCredentialsPoliciesEntity": + """Returns whether Scm basic auth is allowed on the site or not. + + Description for Returns whether Scm basic auth is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_scm_allowed.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + + async def update_scm_allowed( + self, + resource_group_name: str, + name: str, + csm_publishing_access_policies_entity: "_models.CsmPublishingCredentialsPoliciesEntity", + **kwargs + ) -> "_models.CsmPublishingCredentialsPoliciesEntity": + """Updates whether user publishing credentials are allowed on the site or not. + + Description for Updates whether user publishing credentials are allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param csm_publishing_access_policies_entity: + :type csm_publishing_access_policies_entity: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_scm_allowed.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + + def list_configurations( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: + """List the configurations of an app. + + Description for List the configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteConfigResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_configurations.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SiteConfigResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + + async def update_application_settings( + self, + resource_group_name: str, + name: str, + app_settings: "_models.StringDictionary", + **kwargs + ) -> "_models.StringDictionary": + """Replaces the application settings of an app. + + Description for Replaces the application settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param app_settings: Application settings of the app. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_application_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + + async def list_application_settings( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.StringDictionary": + """Gets the application settings of an app. + + Description for Gets the application settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_application_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + + async def update_auth_settings( + self, + resource_group_name: str, + name: str, + site_auth_settings: "_models.SiteAuthSettings", + **kwargs + ) -> "_models.SiteAuthSettings": + """Updates the Authentication / Authorization settings associated with web app. + + Description for Updates the Authentication / Authorization settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param site_auth_settings: Auth settings associated with web app. + :type site_auth_settings: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_auth_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + + async def get_auth_settings( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.SiteAuthSettings": + """Gets the Authentication/Authorization settings of an app. + + Description for Gets the Authentication/Authorization settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_auth_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + + async def update_auth_settings_v2( + self, + resource_group_name: str, + name: str, + site_auth_settings_v2: "_models.SiteAuthSettingsV2", + **kwargs + ) -> "_models.SiteAuthSettingsV2": + """Updates site's Authentication / Authorization settings for apps via the V2 format. + + Description for Updates site's Authentication / Authorization settings for apps via the V2 + format. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param site_auth_settings_v2: Auth settings associated with web app. + :type site_auth_settings_v2: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettingsV2, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_auth_settings_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + + async def get_auth_settings_v2( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.SiteAuthSettingsV2": + """Gets site's Authentication / Authorization settings for apps via the V2 format. + + Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettingsV2, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_auth_settings_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + + async def update_azure_storage_accounts( + self, + resource_group_name: str, + name: str, + azure_storage_accounts: "_models.AzureStoragePropertyDictionaryResource", + **kwargs + ) -> "_models.AzureStoragePropertyDictionaryResource": + """Updates the Azure storage account configurations of an app. + + Description for Updates the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param azure_storage_accounts: Azure storage accounts of the app. + :type azure_storage_accounts: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureStoragePropertyDictionaryResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureStoragePropertyDictionaryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_azure_storage_accounts.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + + async def list_azure_storage_accounts( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.AzureStoragePropertyDictionaryResource": + """Gets the Azure storage account configurations of an app. + + Description for Gets the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureStoragePropertyDictionaryResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureStoragePropertyDictionaryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_azure_storage_accounts.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + + async def update_backup_configuration( + self, + resource_group_name: str, + name: str, + request: "_models.BackupRequest", + **kwargs + ) -> "_models.BackupRequest": + """Updates the backup configuration of an app. + + Description for Updates the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param request: Edited backup configuration. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_backup_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + + async def delete_backup_configuration( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Deletes the backup configuration of an app. + + Description for Deletes the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_backup_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + + async def get_backup_configuration( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.BackupRequest": + """Gets the backup configuration of an app. + + Description for Gets the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_backup_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + + def get_app_settings_key_vault_references( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: + """Gets the config reference app settings and status of an app. + + Description for Gets the config reference app settings and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApiKVReferenceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_app_settings_key_vault_references.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApiKVReferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + + async def get_app_setting_key_vault_reference( + self, + resource_group_name: str, + name: str, + app_setting_key: str, + **kwargs + ) -> "_models.ApiKVReference": + """Gets the config reference and status of an app. + + Description for Gets the config reference and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param app_setting_key: App Setting key name. + :type app_setting_key: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApiKVReference, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReference"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_app_setting_key_vault_reference.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'appSettingKey': self._serialize.url("app_setting_key", app_setting_key, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApiKVReference', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + + def get_site_connection_string_key_vault_references( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: + """Gets the config reference app settings and status of an app. + + Description for Gets the config reference app settings and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApiKVReferenceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_site_connection_string_key_vault_references.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApiKVReferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} # type: ignore + + async def get_site_connection_string_key_vault_reference( + self, + resource_group_name: str, + name: str, + connection_string_key: str, + **kwargs + ) -> "_models.ApiKVReference": + """Gets the config reference and status of an app. + + Description for Gets the config reference and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param connection_string_key: + :type connection_string_key: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApiKVReference, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReference"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_connection_string_key_vault_reference.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'connectionStringKey': self._serialize.url("connection_string_key", connection_string_key, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApiKVReference', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + + async def update_connection_strings( + self, + resource_group_name: str, + name: str, + connection_strings: "_models.ConnectionStringDictionary", + **kwargs + ) -> "_models.ConnectionStringDictionary": + """Replaces the connection strings of an app. + + Description for Replaces the connection strings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param connection_strings: Connection strings of the app or deployment slot. See example. + :type connection_strings: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionStringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionStringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_connection_strings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + + async def list_connection_strings( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.ConnectionStringDictionary": + """Gets the connection strings of an app. + + Description for Gets the connection strings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionStringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionStringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_connection_strings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + + async def get_diagnostic_logs_configuration( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.SiteLogsConfig": + """Gets the logging configuration of an app. + + Description for Gets the logging configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteLogsConfig, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteLogsConfig"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_diagnostic_logs_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteLogsConfig', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + + async def update_diagnostic_logs_config( + self, + resource_group_name: str, + name: str, + site_logs_config: "_models.SiteLogsConfig", + **kwargs + ) -> "_models.SiteLogsConfig": + """Updates the logging configuration of an app. + + Description for Updates the logging configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param site_logs_config: A SiteLogsConfig JSON object that contains the logging configuration + to change in the "properties" property. + :type site_logs_config: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteLogsConfig, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteLogsConfig"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_diagnostic_logs_config.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteLogsConfig', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + + async def update_metadata( + self, + resource_group_name: str, + name: str, + metadata: "_models.StringDictionary", + **kwargs + ) -> "_models.StringDictionary": + """Replaces the metadata of an app. + + Description for Replaces the metadata of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param metadata: Edited metadata of the app or deployment slot. See example. + :type metadata: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_metadata.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(metadata, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + + async def list_metadata( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.StringDictionary": + """Gets the metadata of an app. + + Description for Gets the metadata of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_metadata.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + + async def _list_publishing_credentials_initial( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.User": + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._list_publishing_credentials_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + + async def begin_list_publishing_credentials( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncLROPoller["_models.User"]: + """Gets the Git/FTP publishing credentials of an app. + + Description for Gets the Git/FTP publishing credentials of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_publishing_credentials_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + + async def update_site_push_settings( + self, + resource_group_name: str, + name: str, + push_settings: "_models.PushSettings", + **kwargs + ) -> "_models.PushSettings": + """Updates the Push settings associated with web app. + + Description for Updates the Push settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param push_settings: Push settings associated with web app. + :type push_settings: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PushSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PushSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_site_push_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(push_settings, 'PushSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PushSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + + async def list_site_push_settings( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.PushSettings": + """Gets the Push settings associated with web app. + + Description for Gets the Push settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PushSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PushSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_site_push_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PushSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + + async def list_slot_configuration_names( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.SlotConfigNamesResource": + """Gets the names of app settings and connection strings that stick to the slot (not swapped). + + Description for Gets the names of app settings and connection strings that stick to the slot + (not swapped). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SlotConfigNamesResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SlotConfigNamesResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotConfigNamesResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_slot_configuration_names.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + + async def update_slot_configuration_names( + self, + resource_group_name: str, + name: str, + slot_config_names: "_models.SlotConfigNamesResource", + **kwargs + ) -> "_models.SlotConfigNamesResource": + """Updates the names of application settings and connection string that remain with the slot during swap operation. + + Description for Updates the names of application settings and connection string that remain + with the slot during swap operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot_config_names: Names of application settings and connection strings. See example. + :type slot_config_names: ~azure.mgmt.web.v2020_12_01.models.SlotConfigNamesResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SlotConfigNamesResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SlotConfigNamesResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotConfigNamesResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_slot_configuration_names.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + + async def get_configuration( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.SiteConfigResource": + """Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + + Description for Gets the configuration of an app, such as platform version and bitness, default + documents, virtual applications, Always On, etc. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + + async def create_or_update_configuration( + self, + resource_group_name: str, + name: str, + site_config: "_models.SiteConfigResource", + **kwargs + ) -> "_models.SiteConfigResource": + """Updates the configuration of an app. + + Description for Updates the configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param site_config: JSON representation of a SiteConfig object. See example. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_config, 'SiteConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + + async def update_configuration( + self, + resource_group_name: str, + name: str, + site_config: "_models.SiteConfigResource", + **kwargs + ) -> "_models.SiteConfigResource": + """Updates the configuration of an app. + + Description for Updates the configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param site_config: JSON representation of a SiteConfig object. See example. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_config, 'SiteConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + + def list_configuration_snapshot_info( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.SiteConfigurationSnapshotInfoCollection"]: + """Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + + Description for Gets a list of web app configuration snapshots identifiers. Each element of the + list contains a timestamp and the ID of the snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteConfigurationSnapshotInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SiteConfigurationSnapshotInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + + async def get_configuration_snapshot( + self, + resource_group_name: str, + name: str, + snapshot_id: str, + **kwargs + ) -> "_models.SiteConfigResource": + """Gets a snapshot of the configuration of an app at a previous point in time. + + Description for Gets a snapshot of the configuration of an app at a previous point in time. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param snapshot_id: The ID of the snapshot to read. + :type snapshot_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_configuration_snapshot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + + async def recover_site_configuration_snapshot( + self, + resource_group_name: str, + name: str, + snapshot_id: str, + **kwargs + ) -> None: + """Reverts the configuration of an app to a previous snapshot. + + Description for Reverts the configuration of an app to a previous snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param snapshot_id: The ID of the snapshot to read. + :type snapshot_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.recover_site_configuration_snapshot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + + async def get_web_site_container_logs( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> Optional[IO]: + """Gets the last lines of docker logs for the given site. + + Description for Gets the last lines of docker logs for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/octet-stream" + + # Construct URL + url = self.get_web_site_container_logs.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + + async def get_container_logs_zip( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> Optional[IO]: + """Gets the ZIP archived docker log files for the given site. + + Description for Gets the ZIP archived docker log files for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/zip" + + # Construct URL + url = self.get_container_logs_zip.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + + def list_continuous_web_jobs( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: + """List continuous web jobs for an app, or a deployment slot. + + Description for List continuous web jobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContinuousWebJobCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ContinuousWebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + + async def get_continuous_web_job( + self, + resource_group_name: str, + name: str, + web_job_name: str, + **kwargs + ) -> Optional["_models.ContinuousWebJob"]: + """Gets a continuous web job by its ID for an app, or a deployment slot. + + Description for Gets a continuous web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContinuousWebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ContinuousWebJob"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_continuous_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + + async def delete_continuous_web_job( + self, + resource_group_name: str, + name: str, + web_job_name: str, + **kwargs + ) -> None: + """Delete a continuous web job by its ID for an app, or a deployment slot. + + Description for Delete a continuous web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_continuous_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + + async def start_continuous_web_job( + self, + resource_group_name: str, + name: str, + web_job_name: str, + **kwargs + ) -> None: + """Start a continuous web job for an app, or a deployment slot. + + Description for Start a continuous web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start_continuous_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + + async def stop_continuous_web_job( + self, + resource_group_name: str, + name: str, + web_job_name: str, + **kwargs + ) -> None: + """Stop a continuous web job for an app, or a deployment slot. + + Description for Stop a continuous web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_continuous_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + + def list_deployments( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.DeploymentCollection"]: + """List deployments for an app, or a deployment slot. + + Description for List deployments for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DeploymentCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_deployments.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DeploymentCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + + async def get_deployment( + self, + resource_group_name: str, + name: str, + id: str, + **kwargs + ) -> "_models.Deployment": + """Get a deployment by its ID for an app, or a deployment slot. + + Description for Get a deployment by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: Deployment ID. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_deployment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + + async def create_deployment( + self, + resource_group_name: str, + name: str, + id: str, + deployment: "_models.Deployment", + **kwargs + ) -> "_models.Deployment": + """Create a deployment for an app, or a deployment slot. + + Description for Create a deployment for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: ID of an existing deployment. + :type id: str + :param deployment: Deployment details. + :type deployment: ~azure.mgmt.web.v2020_12_01.models.Deployment + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_deployment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(deployment, 'Deployment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + + async def delete_deployment( + self, + resource_group_name: str, + name: str, + id: str, + **kwargs + ) -> None: + """Delete a deployment by its ID for an app, or a deployment slot. + + Description for Delete a deployment by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: Deployment ID. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_deployment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + + async def list_deployment_log( + self, + resource_group_name: str, + name: str, + id: str, + **kwargs + ) -> "_models.Deployment": + """List deployment log for specific deployment for an app, or a deployment slot. + + Description for List deployment log for specific deployment for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: The ID of a specific deployment. This is the value of the name property in the JSON + response from "GET /api/sites/{siteName}/deployments". + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_deployment_log.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + + async def discover_backup( + self, + resource_group_name: str, + name: str, + request: "_models.RestoreRequest", + **kwargs + ) -> "_models.RestoreRequest": + """Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + + Description for Discovers an existing app backup that can be restored from a blob in Azure + storage. Use this to get information about the databases stored in a backup. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param request: A RestoreRequest object that includes Azure storage URL and blog name for + discovery of backup. + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RestoreRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.discover_backup.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RestoreRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + + def list_domain_ownership_identifiers( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.IdentifierCollection"]: + """Lists ownership identifiers for domain associated with web app. + + Description for Lists ownership identifiers for domain associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IdentifierCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IdentifierCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + + async def get_domain_ownership_identifier( + self, + resource_group_name: str, + name: str, + domain_ownership_identifier_name: str, + **kwargs + ) -> "_models.Identifier": + """Get domain ownership identifier for web app. + + Description for Get domain ownership identifier for web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_domain_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + async def create_or_update_domain_ownership_identifier( + self, + resource_group_name: str, + name: str, + domain_ownership_identifier_name: str, + domain_ownership_identifier: "_models.Identifier", + **kwargs + ) -> "_models.Identifier": + """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + + Description for Creates a domain ownership identifier for web app, or updates an existing + ownership identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.Identifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_domain_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + async def delete_domain_ownership_identifier( + self, + resource_group_name: str, + name: str, + domain_ownership_identifier_name: str, + **kwargs + ) -> None: + """Deletes a domain ownership identifier for a web app. + + Description for Deletes a domain ownership identifier for a web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_domain_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + async def update_domain_ownership_identifier( + self, + resource_group_name: str, + name: str, + domain_ownership_identifier_name: str, + domain_ownership_identifier: "_models.Identifier", + **kwargs + ) -> "_models.Identifier": + """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + + Description for Creates a domain ownership identifier for web app, or updates an existing + ownership identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.Identifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_domain_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + async def get_ms_deploy_status( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.MSDeployStatus": + """Get the status of the last MSDeploy operation. + + Description for Get the status of the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ms_deploy_status.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + + async def _create_ms_deploy_operation_initial( + self, + resource_group_name: str, + name: str, + ms_deploy: "_models.MSDeploy", + **kwargs + ) -> Optional["_models.MSDeployStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployStatus"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_ms_deploy_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + + async def begin_create_ms_deploy_operation( + self, + resource_group_name: str, + name: str, + ms_deploy: "_models.MSDeploy", + **kwargs + ) -> AsyncLROPoller["_models.MSDeployStatus"]: + """Invoke the MSDeploy web app extension. + + Description for Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param ms_deploy: Details of MSDeploy operation. + :type ms_deploy: ~azure.mgmt.web.v2020_12_01.models.MSDeploy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + ms_deploy=ms_deploy, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + + async def get_ms_deploy_log( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> Optional["_models.MSDeployLog"]: + """Get the MSDeploy Log for the last MSDeploy operation. + + Description for Get the MSDeploy Log for the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployLog, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployLog"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ms_deploy_log.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + + def list_functions( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: + """List the functions for a web site, or a deployment slot. + + Description for List the functions for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FunctionEnvelopeCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopeCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_functions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('FunctionEnvelopeCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + + async def get_functions_admin_token( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> str: + """Fetch a short lived token that can be exchanged for a master key. + + Description for Fetch a short lived token that can be exchanged for a master key. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_functions_admin_token.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + + async def get_function( + self, + resource_group_name: str, + name: str, + function_name: str, + **kwargs + ) -> Optional["_models.FunctionEnvelope"]: + """Get function information by its ID for web site, or a deployment slot. + + Description for Get function information by its ID for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionEnvelope, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FunctionEnvelope"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_function.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + + async def _create_function_initial( + self, + resource_group_name: str, + name: str, + function_name: str, + function_envelope: "_models.FunctionEnvelope", + **kwargs + ) -> "_models.FunctionEnvelope": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_function_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + + async def begin_create_function( + self, + resource_group_name: str, + name: str, + function_name: str, + function_envelope: "_models.FunctionEnvelope", + **kwargs + ) -> AsyncLROPoller["_models.FunctionEnvelope"]: + """Create function for web site, or a deployment slot. + + Description for Create function for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param function_envelope: Function details. + :type function_envelope: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_function_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + function_envelope=function_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + + async def delete_function( + self, + resource_group_name: str, + name: str, + function_name: str, + **kwargs + ) -> None: + """Delete a function for web site, or a deployment slot. + + Description for Delete a function for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_function.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + + async def create_or_update_function_secret( + self, + resource_group_name: str, + name: str, + function_name: str, + key_name: str, + key: "_models.KeyInfo", + **kwargs + ) -> "_models.KeyInfo": + """Add or update a function secret. + + Description for Add or update a function secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: The name of the function. + :type function_name: str + :param key_name: The name of the key. + :type key_name: str + :param key: The key to create or update. + :type key: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KeyInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_function_secret.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key, 'KeyInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + + async def delete_function_secret( + self, + resource_group_name: str, + name: str, + function_name: str, + key_name: str, + **kwargs + ) -> None: + """Delete a function secret. + + Description for Delete a function secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: The name of the function. + :type function_name: str + :param key_name: The name of the key. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_function_secret.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + + async def list_function_keys( + self, + resource_group_name: str, + name: str, + function_name: str, + **kwargs + ) -> "_models.StringDictionary": + """Get function keys for a function in a web site, or a deployment slot. + + Description for Get function keys for a function in a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_function_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + + async def list_function_secrets( + self, + resource_group_name: str, + name: str, + function_name: str, + **kwargs + ) -> "_models.FunctionSecrets": + """Get function secrets for a function in a web site, or a deployment slot. + + Description for Get function secrets for a function in a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_function_secrets.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + + async def list_host_keys( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.HostKeys": + """Get host secrets for a function app. + + Description for Get host secrets for a function app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostKeys, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_host_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + + async def list_sync_status( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """This is to allow calling via powershell and ARM template. + + Description for This is to allow calling via powershell and ARM template. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_sync_status.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + + async def sync_functions( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Syncs function trigger metadata to the management database. + + Description for Syncs function trigger metadata to the management database. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_functions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + + async def create_or_update_host_secret( + self, + resource_group_name: str, + name: str, + key_type: str, + key_name: str, + key: "_models.KeyInfo", + **kwargs + ) -> "_models.KeyInfo": + """Add or update a host level secret. + + Description for Add or update a host level secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param key_type: The type of host key. + :type key_type: str + :param key_name: The name of the key. + :type key_name: str + :param key: The key to create or update. + :type key: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KeyInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_host_secret.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'keyType': self._serialize.url("key_type", key_type, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key, 'KeyInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + + async def delete_host_secret( + self, + resource_group_name: str, + name: str, + key_type: str, + key_name: str, + **kwargs + ) -> None: + """Delete a host level secret. + + Description for Delete a host level secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param key_type: The type of host key. + :type key_type: str + :param key_name: The name of the key. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_host_secret.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'keyType': self._serialize.url("key_type", key_type, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + + def list_host_name_bindings( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.HostNameBindingCollection"]: + """Get hostname bindings for an app or a deployment slot. + + Description for Get hostname bindings for an app or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HostNameBindingCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBindingCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_host_name_bindings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('HostNameBindingCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + + async def get_host_name_binding( + self, + resource_group_name: str, + name: str, + host_name: str, + **kwargs + ) -> "_models.HostNameBinding": + """Get the named hostname binding for an app (or deployment slot, if specified). + + Description for Get the named hostname binding for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostNameBinding, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBinding"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_host_name_binding.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostNameBinding', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + + async def create_or_update_host_name_binding( + self, + resource_group_name: str, + name: str, + host_name: str, + host_name_binding: "_models.HostNameBinding", + **kwargs + ) -> "_models.HostNameBinding": + """Creates a hostname binding for an app. + + Description for Creates a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :param host_name_binding: Binding details. This is the JSON representation of a HostNameBinding + object. + :type host_name_binding: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostNameBinding, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBinding"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_host_name_binding.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostNameBinding', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + + async def delete_host_name_binding( + self, + resource_group_name: str, + name: str, + host_name: str, + **kwargs + ) -> None: + """Deletes a hostname binding for an app. + + Description for Deletes a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_host_name_binding.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + + async def get_hybrid_connection( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + **kwargs + ) -> "_models.HybridConnection": + """Retrieves a specific Service Bus Hybrid Connection used by this Web App. + + Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + async def create_or_update_hybrid_connection( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + connection_envelope: "_models.HybridConnection", + **kwargs + ) -> "_models.HybridConnection": + """Creates a new Hybrid Connection using a Service Bus relay. + + Description for Creates a new Hybrid Connection using a Service Bus relay. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param connection_envelope: The details of the hybrid connection. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + async def delete_hybrid_connection( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + **kwargs + ) -> None: + """Removes a Hybrid Connection from this site. + + Description for Removes a Hybrid Connection from this site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + async def update_hybrid_connection( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + connection_envelope: "_models.HybridConnection", + **kwargs + ) -> "_models.HybridConnection": + """Creates a new Hybrid Connection using a Service Bus relay. + + Description for Creates a new Hybrid Connection using a Service Bus relay. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param connection_envelope: The details of the hybrid connection. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + async def list_hybrid_connections( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.HybridConnection": + """Retrieves all Service Bus Hybrid Connections used by this Web App. + + Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_hybrid_connections.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + + async def list_relay_service_connections( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.RelayServiceConnectionEntity": + """Gets hybrid connections configured for an app (or deployment slot, if specified). + + Description for Gets hybrid connections configured for an app (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_relay_service_connections.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + + async def get_relay_service_connection( + self, + resource_group_name: str, + name: str, + entity_name: str, + **kwargs + ) -> "_models.RelayServiceConnectionEntity": + """Gets a hybrid connection configuration by its name. + + Description for Gets a hybrid connection configuration by its name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection. + :type entity_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_relay_service_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + + async def create_or_update_relay_service_connection( + self, + resource_group_name: str, + name: str, + entity_name: str, + connection_envelope: "_models.RelayServiceConnectionEntity", + **kwargs + ) -> "_models.RelayServiceConnectionEntity": + """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + + Description for Creates a new hybrid connection configuration (PUT), or updates an existing one + (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param connection_envelope: Details of the hybrid connection configuration. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_relay_service_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + + async def delete_relay_service_connection( + self, + resource_group_name: str, + name: str, + entity_name: str, + **kwargs + ) -> None: + """Deletes a relay service connection by its name. + + Description for Deletes a relay service connection by its name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_relay_service_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + + async def update_relay_service_connection( + self, + resource_group_name: str, + name: str, + entity_name: str, + connection_envelope: "_models.RelayServiceConnectionEntity", + **kwargs + ) -> "_models.RelayServiceConnectionEntity": + """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + + Description for Creates a new hybrid connection configuration (PUT), or updates an existing one + (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param connection_envelope: Details of the hybrid connection configuration. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_relay_service_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + + def list_instance_identifiers( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: + """Gets all scale-out instances of an app. + + Description for Gets all scale-out instances of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppInstanceStatusCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppInstanceStatusCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_identifiers.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppInstanceStatusCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + + async def get_instance_info( + self, + resource_group_name: str, + name: str, + instance_id: str, + **kwargs + ) -> "_models.WebSiteInstanceStatus": + """Gets all scale-out instances of an app. + + Description for Gets all scale-out instances of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param instance_id: + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebSiteInstanceStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebSiteInstanceStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_info.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + + async def get_instance_ms_deploy_status( + self, + resource_group_name: str, + name: str, + instance_id: str, + **kwargs + ) -> "_models.MSDeployStatus": + """Get the status of the last MSDeploy operation. + + Description for Get the status of the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param instance_id: ID of web app instance. + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_ms_deploy_status.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + async def _create_instance_ms_deploy_operation_initial( + self, + resource_group_name: str, + name: str, + instance_id: str, + ms_deploy: "_models.MSDeploy", + **kwargs + ) -> Optional["_models.MSDeployStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployStatus"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_instance_ms_deploy_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + async def begin_create_instance_ms_deploy_operation( + self, + resource_group_name: str, + name: str, + instance_id: str, + ms_deploy: "_models.MSDeploy", + **kwargs + ) -> AsyncLROPoller["_models.MSDeployStatus"]: + """Invoke the MSDeploy web app extension. + + Description for Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param instance_id: ID of web app instance. + :type instance_id: str + :param ms_deploy: Details of MSDeploy operation. + :type ms_deploy: ~azure.mgmt.web.v2020_12_01.models.MSDeploy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_instance_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + instance_id=instance_id, + ms_deploy=ms_deploy, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + async def get_instance_ms_deploy_log( + self, + resource_group_name: str, + name: str, + instance_id: str, + **kwargs + ) -> Optional["_models.MSDeployLog"]: + """Get the MSDeploy Log for the last MSDeploy operation. + + Description for Get the MSDeploy Log for the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param instance_id: ID of web app instance. + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployLog, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployLog"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_ms_deploy_log.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + + def list_instance_processes( + self, + resource_group_name: str, + name: str, + instance_id: str, + **kwargs + ) -> AsyncIterable["_models.ProcessInfoCollection"]: + """Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + + Description for Get list of processes for a web site, or a deployment slot, or for a specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_processes.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + + async def get_instance_process( + self, + resource_group_name: str, + name: str, + process_id: str, + instance_id: str, + **kwargs + ) -> Optional["_models.ProcessInfo"]: + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + + async def delete_instance_process( + self, + resource_group_name: str, + name: str, + process_id: str, + instance_id: str, + **kwargs + ) -> None: + """Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + + Description for Terminate a process by its ID for a web site, or a deployment slot, or specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_instance_process.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + + async def get_instance_process_dump( + self, + resource_group_name: str, + name: str, + process_id: str, + instance_id: str, + **kwargs + ) -> Optional[IO]: + """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + + Description for Get a memory dump of a process by its ID for a specific scaled-out instance in + a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process_dump.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + + def list_instance_process_modules( + self, + resource_group_name: str, + name: str, + process_id: str, + instance_id: str, + **kwargs + ) -> AsyncIterable["_models.ProcessModuleInfoCollection"]: + """List module information for a process by its ID for a specific scaled-out instance in a web site. + + Description for List module information for a process by its ID for a specific scaled-out + instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessModuleInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_process_modules.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessModuleInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + + async def get_instance_process_module( + self, + resource_group_name: str, + name: str, + process_id: str, + base_address: str, + instance_id: str, + **kwargs + ) -> Optional["_models.ProcessModuleInfo"]: + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param base_address: Module base address. + :type base_address: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessModuleInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessModuleInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process_module.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'baseAddress': self._serialize.url("base_address", base_address, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + + def list_instance_process_threads( + self, + resource_group_name: str, + name: str, + process_id: str, + instance_id: str, + **kwargs + ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: + """List the threads in a process by its ID for a specific scaled-out instance in a web site. + + Description for List the threads in a process by its ID for a specific scaled-out instance in a + web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessThreadInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_process_threads.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessThreadInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + + async def is_cloneable( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.SiteCloneability": + """Shows whether an app can be cloned to another resource group or subscription. + + Description for Shows whether an app can be cloned to another resource group or subscription. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteCloneability, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteCloneability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteCloneability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.is_cloneable.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteCloneability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + + def list_site_backups( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.BackupItemCollection"]: + """Gets existing backups of an app. + + Description for Gets existing backups of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupItemCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_backups.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BackupItemCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + + async def list_sync_function_triggers( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.FunctionSecrets": + """This is to allow calling via powershell and ARM template. + + Description for This is to allow calling via powershell and ARM template. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_sync_function_triggers.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + + async def _migrate_storage_initial( + self, + subscription_name: str, + resource_group_name: str, + name: str, + migration_options: "_models.StorageMigrationOptions", + **kwargs + ) -> "_models.StorageMigrationResponse": + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._migrate_storage_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + + async def begin_migrate_storage( + self, + subscription_name: str, + resource_group_name: str, + name: str, + migration_options: "_models.StorageMigrationOptions", + **kwargs + ) -> AsyncLROPoller["_models.StorageMigrationResponse"]: + """Restores a web app. + + Description for Restores a web app. + + :param subscription_name: Azure subscription. + :type subscription_name: str + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param migration_options: Migration migrationOptions. + :type migration_options: ~azure.mgmt.web.v2020_12_01.models.StorageMigrationOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either StorageMigrationResponse or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.StorageMigrationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._migrate_storage_initial( + subscription_name=subscription_name, + resource_group_name=resource_group_name, + name=name, + migration_options=migration_options, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + + async def _migrate_my_sql_initial( + self, + resource_group_name: str, + name: str, + migration_request_envelope: "_models.MigrateMySqlRequest", + **kwargs + ) -> "_models.Operation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._migrate_my_sql_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Operation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + + async def begin_migrate_my_sql( + self, + resource_group_name: str, + name: str, + migration_request_envelope: "_models.MigrateMySqlRequest", + **kwargs + ) -> AsyncLROPoller["_models.Operation"]: + """Migrates a local (in-app) MySql database to a remote MySql database. + + Description for Migrates a local (in-app) MySql database to a remote MySql database. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param migration_request_envelope: MySql migration options. + :type migration_request_envelope: ~azure.mgmt.web.v2020_12_01.models.MigrateMySqlRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Operation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._migrate_my_sql_initial( + resource_group_name=resource_group_name, + name=name, + migration_request_envelope=migration_request_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Operation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + + async def get_migrate_my_sql_status( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.MigrateMySqlStatus": + """Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + + Description for Returns the status of MySql in app migration, if one is active, and whether or + not MySql in app is enabled. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MigrateMySqlStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MigrateMySqlStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MigrateMySqlStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_migrate_my_sql_status.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + + async def get_swift_virtual_network_connection( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.SwiftVirtualNetwork": + """Gets a Swift Virtual Network connection. + + Description for Gets a Swift Virtual Network connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SwiftVirtualNetwork, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SwiftVirtualNetwork + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SwiftVirtualNetwork"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_swift_virtual_network_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + + async def delete_swift_virtual_network( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Deletes a Swift Virtual Network connection from an app (or deployment slot). + + Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_swift_virtual_network.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + + async def list_network_features( + self, + resource_group_name: str, + name: str, + view: str, + **kwargs + ) -> Optional["_models.NetworkFeatures"]: + """Gets all network features used by the app (or deployment slot, if specified). + + Description for Gets all network features used by the app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param view: The type of view. Only "summary" is supported at this time. + :type view: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkFeatures, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.NetworkFeatures or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetworkFeatures"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_network_features.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'view': self._serialize.url("view", view, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + + async def get_network_trace_operation( + self, + resource_group_name: str, + name: str, + operation_id: str, + **kwargs + ) -> List["_models.NetworkTrace"]: + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_trace_operation.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + + async def start_web_site_network_trace( + self, + resource_group_name: str, + name: str, + duration_in_seconds: Optional[int] = None, + max_frame_length: Optional[int] = None, + sas_url: Optional[str] = None, + **kwargs + ) -> str: + """Start capturing network packets for the site (To be deprecated). + + Description for Start capturing network packets for the site (To be deprecated). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start_web_site_network_trace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + + async def _start_web_site_network_trace_operation_initial( + self, + resource_group_name: str, + name: str, + duration_in_seconds: Optional[int] = None, + max_frame_length: Optional[int] = None, + sas_url: Optional[str] = None, + **kwargs + ) -> List["_models.NetworkTrace"]: + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._start_web_site_network_trace_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + + async def begin_start_web_site_network_trace_operation( + self, + resource_group_name: str, + name: str, + duration_in_seconds: Optional[int] = None, + max_frame_length: Optional[int] = None, + sas_url: Optional[str] = None, + **kwargs + ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: + """Start capturing network packets for the site. + + Description for Start capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_web_site_network_trace_operation_initial( + resource_group_name=resource_group_name, + name=name, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + + async def stop_web_site_network_trace( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Stop ongoing capturing network packets for the site. + + Description for Stop ongoing capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_web_site_network_trace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + + async def get_network_traces( + self, + resource_group_name: str, + name: str, + operation_id: str, + **kwargs + ) -> List["_models.NetworkTrace"]: + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_traces.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + + async def get_network_trace_operation_v2( + self, + resource_group_name: str, + name: str, + operation_id: str, + **kwargs + ) -> List["_models.NetworkTrace"]: + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_trace_operation_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + + async def get_network_traces_v2( + self, + resource_group_name: str, + name: str, + operation_id: str, + **kwargs + ) -> List["_models.NetworkTrace"]: + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_traces_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + + async def generate_new_site_publishing_password( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Generates a new publishing password for an app (or deployment slot, if specified). + + Description for Generates a new publishing password for an app (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.generate_new_site_publishing_password.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + + def list_perf_mon_counters( + self, + resource_group_name: str, + name: str, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.PerfMonCounterCollection"]: + """Gets perfmon counters for web app. + + Description for Gets perfmon counters for web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param filter: Return only usages/metrics specified in the filter. Filter conforms to odata + syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z + and timeGrain eq duration'[Hour|Minute|Day]'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PerfMonCounterCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PerfMonCounterCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_perf_mon_counters.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PerfMonCounterCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + + async def get_site_php_error_log_flag( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.SitePhpErrorLogFlag": + """Gets web app's event logs. + + Description for Gets web app's event logs. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SitePhpErrorLogFlag, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SitePhpErrorLogFlag + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SitePhpErrorLogFlag"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_php_error_log_flag.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + + async def list_premier_add_ons( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.PremierAddOn": + """Gets the premier add-ons of an app. + + Description for Gets the premier add-ons of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_premier_add_ons.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + + async def get_premier_add_on( + self, + resource_group_name: str, + name: str, + premier_add_on_name: str, + **kwargs + ) -> "_models.PremierAddOn": + """Gets a named add-on of an app. + + Description for Gets a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_premier_add_on.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + + async def add_premier_add_on( + self, + resource_group_name: str, + name: str, + premier_add_on_name: str, + premier_add_on: "_models.PremierAddOn", + **kwargs + ) -> "_models.PremierAddOn": + """Updates a named add-on of an app. + + Description for Updates a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param premier_add_on: A JSON representation of the edited premier add-on. + :type premier_add_on: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.add_premier_add_on.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + + async def delete_premier_add_on( + self, + resource_group_name: str, + name: str, + premier_add_on_name: str, + **kwargs + ) -> None: + """Delete a premier add-on from an app. + + Description for Delete a premier add-on from an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_premier_add_on.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + + async def update_premier_add_on( + self, + resource_group_name: str, + name: str, + premier_add_on_name: str, + premier_add_on: "_models.PremierAddOnPatchResource", + **kwargs + ) -> "_models.PremierAddOn": + """Updates a named add-on of an app. + + Description for Updates a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param premier_add_on: A JSON representation of the edited premier add-on. + :type premier_add_on: ~azure.mgmt.web.v2020_12_01.models.PremierAddOnPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_premier_add_on.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + + async def get_private_access( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.PrivateAccess": + """Gets data around private site access enablement and authorized Virtual Networks that can access the site. + + Description for Gets data around private site access enablement and authorized Virtual Networks + that can access the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateAccess, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateAccess"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_access.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + + async def put_private_access_vnet( + self, + resource_group_name: str, + name: str, + access: "_models.PrivateAccess", + **kwargs + ) -> "_models.PrivateAccess": + """Sets data around private site access enablement and authorized Virtual Networks that can access the site. + + Description for Sets data around private site access enablement and authorized Virtual Networks + that can access the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param access: The information for the private access. + :type access: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateAccess, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateAccess"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put_private_access_vnet.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(access, 'PrivateAccess') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + + def get_private_endpoint_connection_list( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: + """Gets the list of private endpoint connections associated with a site. + + Description for Gets the list of private endpoint connections associated with a site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} # type: ignore + + async def get_private_endpoint_connection( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> "_models.RemotePrivateEndpointConnectionARMResource": + """Gets a private endpoint connection. + + Description for Gets a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RemotePrivateEndpointConnectionARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _approve_or_reject_private_endpoint_connection_initial( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + private_endpoint_wrapper: "_models.PrivateLinkConnectionApprovalRequestResource", + **kwargs + ) -> "_models.RemotePrivateEndpointConnectionARMResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._approve_or_reject_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_approve_or_reject_private_endpoint_connection( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + private_endpoint_wrapper: "_models.PrivateLinkConnectionApprovalRequestResource", + **kwargs + ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: + """Approves or rejects a private endpoint connection. + + Description for Approves or rejects a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param private_endpoint_wrapper: + :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionApprovalRequestResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RemotePrivateEndpointConnectionARMResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._approve_or_reject_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_wrapper=private_endpoint_wrapper, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_private_endpoint_connection_initial( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> object: + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 204: + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete_private_endpoint_connection( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> AsyncLROPoller[object]: + """Deletes a private endpoint connection. + + Description for Deletes a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either object or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[object] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[object] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def get_private_link_resources( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.PrivateLinkResourcesWrapper": + """Gets the private link resources. + + Description for Gets the private link resources. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesWrapper, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesWrapper"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_link_resources.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + + def list_processes( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.ProcessInfoCollection"]: + """Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + + Description for Get list of processes for a web site, or a deployment slot, or for a specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_processes.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + + async def get_process( + self, + resource_group_name: str, + name: str, + process_id: str, + **kwargs + ) -> Optional["_models.ProcessInfo"]: + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + + async def delete_process( + self, + resource_group_name: str, + name: str, + process_id: str, + **kwargs + ) -> None: + """Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + + Description for Terminate a process by its ID for a web site, or a deployment slot, or specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_process.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + + async def get_process_dump( + self, + resource_group_name: str, + name: str, + process_id: str, + **kwargs + ) -> Optional[IO]: + """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + + Description for Get a memory dump of a process by its ID for a specific scaled-out instance in + a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process_dump.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + + def list_process_modules( + self, + resource_group_name: str, + name: str, + process_id: str, + **kwargs + ) -> AsyncIterable["_models.ProcessModuleInfoCollection"]: + """List module information for a process by its ID for a specific scaled-out instance in a web site. + + Description for List module information for a process by its ID for a specific scaled-out + instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessModuleInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_process_modules.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessModuleInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + + async def get_process_module( + self, + resource_group_name: str, + name: str, + process_id: str, + base_address: str, + **kwargs + ) -> Optional["_models.ProcessModuleInfo"]: + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param base_address: Module base address. + :type base_address: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessModuleInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessModuleInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process_module.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'baseAddress': self._serialize.url("base_address", base_address, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + + def list_process_threads( + self, + resource_group_name: str, + name: str, + process_id: str, + **kwargs + ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: + """List the threads in a process by its ID for a specific scaled-out instance in a web site. + + Description for List the threads in a process by its ID for a specific scaled-out instance in a + web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessThreadInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_process_threads.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessThreadInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + + def list_public_certificates( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.PublicCertificateCollection"]: + """Get public certificates for an app or a deployment slot. + + Description for Get public certificates for an app or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicCertificateCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificateCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_public_certificates.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PublicCertificateCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + + async def get_public_certificate( + self, + resource_group_name: str, + name: str, + public_certificate_name: str, + **kwargs + ) -> "_models.PublicCertificate": + """Get the named public certificate for an app (or deployment slot, if specified). + + Description for Get the named public certificate for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_public_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + + async def create_or_update_public_certificate( + self, + resource_group_name: str, + name: str, + public_certificate_name: str, + public_certificate: "_models.PublicCertificate", + **kwargs + ) -> "_models.PublicCertificate": + """Creates a hostname binding for an app. + + Description for Creates a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :param public_certificate: Public certificate details. This is the JSON representation of a + PublicCertificate object. + :type public_certificate: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_public_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + + async def delete_public_certificate( + self, + resource_group_name: str, + name: str, + public_certificate_name: str, + **kwargs + ) -> None: + """Deletes a hostname binding for an app. + + Description for Deletes a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_public_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + + async def list_publishing_profile_xml_with_secrets( + self, + resource_group_name: str, + name: str, + publishing_profile_options: "_models.CsmPublishingProfileOptions", + **kwargs + ) -> IO: + """Gets the publishing profile for an app (or deployment slot, if specified). + + Description for Gets the publishing profile for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param publishing_profile_options: Specifies publishingProfileOptions for publishing profile. + For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + :type publishing_profile_options: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingProfileOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[IO] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/xml" + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + + async def reset_production_slot_config( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + + Description for Resets the configuration settings of the current slot if they were previously + modified by calling the API with POST. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reset_production_slot_config.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + + async def restart( + self, + resource_group_name: str, + name: str, + soft_restart: Optional[bool] = None, + synchronous: Optional[bool] = None, + **kwargs + ) -> None: + """Restarts an app (or deployment slot, if specified). + + Description for Restarts an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param soft_restart: Specify true to apply the configuration settings and restarts the app only + if necessary. By default, the API always restarts and reprovisions the app. + :type soft_restart: bool + :param synchronous: Specify true to block until the app is restarted. By default, it is set to + false, and the API responds immediately (asynchronous). + :type synchronous: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.restart.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + if synchronous is not None: + query_parameters['synchronous'] = self._serialize.query("synchronous", synchronous, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + + async def _restore_from_backup_blob_initial( + self, + resource_group_name: str, + name: str, + request: "_models.RestoreRequest", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_from_backup_blob_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + + async def begin_restore_from_backup_blob( + self, + resource_group_name: str, + name: str, + request: "_models.RestoreRequest", + **kwargs + ) -> AsyncLROPoller[None]: + """Restores an app from a backup blob in Azure Storage. + + Description for Restores an app from a backup blob in Azure Storage. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restore_from_backup_blob_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + + async def _restore_from_deleted_app_initial( + self, + resource_group_name: str, + name: str, + restore_request: "_models.DeletedAppRestoreRequest", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_from_deleted_app_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + + async def begin_restore_from_deleted_app( + self, + resource_group_name: str, + name: str, + restore_request: "_models.DeletedAppRestoreRequest", + **kwargs + ) -> AsyncLROPoller[None]: + """Restores a deleted web app to this web app. + + Description for Restores a deleted web app to this web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param restore_request: Deleted web app restore information. + :type restore_request: ~azure.mgmt.web.v2020_12_01.models.DeletedAppRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restore_from_deleted_app_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + + async def _restore_snapshot_initial( + self, + resource_group_name: str, + name: str, + restore_request: "_models.SnapshotRestoreRequest", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_snapshot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + + async def begin_restore_snapshot( + self, + resource_group_name: str, + name: str, + restore_request: "_models.SnapshotRestoreRequest", + **kwargs + ) -> AsyncLROPoller[None]: + """Restores a web app from a snapshot. + + Description for Restores a web app from a snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param restore_request: Snapshot restore settings. Snapshot information can be obtained by + calling GetDeletedSites or GetSiteSnapshots API. + :type restore_request: ~azure.mgmt.web.v2020_12_01.models.SnapshotRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restore_snapshot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + + def list_site_extensions( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: + """Get list of siteextensions for a web site, or a deployment slot. + + Description for Get list of siteextensions for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteExtensionInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_extensions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SiteExtensionInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + + async def get_site_extension( + self, + resource_group_name: str, + name: str, + site_extension_id: str, + **kwargs + ) -> Optional["_models.SiteExtensionInfo"]: + """Get site extension information by its ID for a web site, or a deployment slot. + + Description for Get site extension information by its ID for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteExtensionInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SiteExtensionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_extension.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + + async def _install_site_extension_initial( + self, + resource_group_name: str, + name: str, + site_extension_id: str, + **kwargs + ) -> Optional["_models.SiteExtensionInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SiteExtensionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._install_site_extension_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.put(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 429]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + + async def begin_install_site_extension( + self, + resource_group_name: str, + name: str, + site_extension_id: str, + **kwargs + ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: + """Install site extension on a web site, or a deployment slot. + + Description for Install site extension on a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._install_site_extension_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + + async def delete_site_extension( + self, + resource_group_name: str, + name: str, + site_extension_id: str, + **kwargs + ) -> None: + """Remove a site extension from a web site, or a deployment slot. + + Description for Remove a site extension from a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_site_extension.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + + def list_slots( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.WebAppCollection"]: + """Gets an app's deployment slots. + + Description for Gets an app's deployment slots. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_slots.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + + async def get_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> Optional["_models.Site"]: + """Gets the details of a web, mobile, or API app. + + Description for Gets the details of a web, mobile, or API app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. By default, this API returns the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Site, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Site"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + + async def _create_or_update_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + site_envelope: "_models.Site", + **kwargs + ) -> "_models.Site": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_envelope, 'Site') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + + async def begin_create_or_update_slot( + self, + resource_group_name: str, + name: str, + slot: str, + site_envelope: "_models.Site", + **kwargs + ) -> AsyncLROPoller["_models.Site"]: + """Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + + Description for Creates a new web, mobile, or API app in an existing resource group, or updates + an existing app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Unique name of the app to create or update. To create or update a deployment slot, + use the {slot} parameter. + :type name: str + :param slot: Name of the deployment slot to create or update. By default, this API attempts to + create or modify the production slot. + :type slot: str + :param site_envelope: A JSON representation of the app properties. See example. + :type site_envelope: ~azure.mgmt.web.v2020_12_01.models.Site + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Site or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.Site] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + site_envelope=site_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + + async def delete_slot( + self, + resource_group_name: str, + name: str, + slot: str, + delete_metrics: Optional[bool] = None, + delete_empty_server_farm: Optional[bool] = None, + **kwargs + ) -> None: + """Deletes a web, mobile, or API app, or one of the deployment slots. + + Description for Deletes a web, mobile, or API app, or one of the deployment slots. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app to delete. + :type name: str + :param slot: Name of the deployment slot to delete. By default, the API deletes the production + slot. + :type slot: str + :param delete_metrics: If true, web app metrics are also deleted. + :type delete_metrics: bool + :param delete_empty_server_farm: Specify false if you want to keep empty App Service plan. By + default, empty App Service plan is deleted. + :type delete_empty_server_farm: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if delete_metrics is not None: + query_parameters['deleteMetrics'] = self._serialize.query("delete_metrics", delete_metrics, 'bool') + if delete_empty_server_farm is not None: + query_parameters['deleteEmptyServerFarm'] = self._serialize.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + + async def update_slot( + self, + resource_group_name: str, + name: str, + slot: str, + site_envelope: "_models.SitePatchResource", + **kwargs + ) -> "_models.Site": + """Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + + Description for Creates a new web, mobile, or API app in an existing resource group, or updates + an existing app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Unique name of the app to create or update. To create or update a deployment slot, + use the {slot} parameter. + :type name: str + :param slot: Name of the deployment slot to create or update. By default, this API attempts to + create or modify the production slot. + :type slot: str + :param site_envelope: A JSON representation of the app properties. See example. + :type site_envelope: ~azure.mgmt.web.v2020_12_01.models.SitePatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Site, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + + async def analyze_custom_hostname_slot( + self, + resource_group_name: str, + name: str, + slot: str, + host_name: Optional[str] = None, + **kwargs + ) -> "_models.CustomHostnameAnalysisResult": + """Analyze a custom hostname. + + Description for Analyze a custom hostname. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param host_name: Custom hostname. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomHostnameAnalysisResult, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CustomHostnameAnalysisResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomHostnameAnalysisResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.analyze_custom_hostname_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + + async def apply_slot_configuration_slot( + self, + resource_group_name: str, + name: str, + slot: str, + slot_swap_entity: "_models.CsmSlotEntity", + **kwargs + ) -> None: + """Applies the configuration settings from the target slot onto the current slot. + + Description for Applies the configuration settings from the target slot onto the current slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the source slot. If a slot is not specified, the production slot is used + as the source slot. + :type slot: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.apply_slot_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + + async def backup_slot( + self, + resource_group_name: str, + name: str, + slot: str, + request: "_models.BackupRequest", + **kwargs + ) -> "_models.BackupItem": + """Creates a backup of an app. + + Description for Creates a backup of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will create a + backup for the production slot. + :type slot: str + :param request: Backup configuration. You can use the JSON response from the POST action as + input here. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.backup_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + + def list_backups_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.BackupItemCollection"]: + """Gets existing backups of an app. + + Description for Gets existing backups of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get backups + of the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupItemCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_backups_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BackupItemCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + + async def get_backup_status_slot( + self, + resource_group_name: str, + name: str, + backup_id: str, + slot: str, + **kwargs + ) -> "_models.BackupItem": + """Gets a backup of an app by its ID. + + Description for Gets a backup of an app by its ID. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get a backup + of the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_backup_status_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + + async def delete_backup_slot( + self, + resource_group_name: str, + name: str, + backup_id: str, + slot: str, + **kwargs + ) -> None: + """Deletes a backup of an app by its ID. + + Description for Deletes a backup of an app by its ID. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete a + backup of the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_backup_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + + async def list_backup_status_secrets_slot( + self, + resource_group_name: str, + name: str, + backup_id: str, + slot: str, + request: "_models.BackupRequest", + **kwargs + ) -> "_models.BackupItem": + """Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + + Description for Gets status of a web app backup that may be in progress, including secrets + associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the + SAS URL for the backup if a new URL is passed in the request body. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param backup_id: ID of backup. + :type backup_id: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param request: Information on backup request. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_backup_status_secrets_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + + async def _restore_slot_initial( + self, + resource_group_name: str, + name: str, + backup_id: str, + slot: str, + request: "_models.RestoreRequest", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + + async def begin_restore_slot( + self, + resource_group_name: str, + name: str, + backup_id: str, + slot: str, + request: "_models.RestoreRequest", + **kwargs + ) -> AsyncLROPoller[None]: + """Restores a specific backup to another app (or deployment slot, if specified). + + Description for Restores a specific backup to another app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will restore a + backup of the production slot. + :type slot: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restore_slot_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + slot=slot, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + + async def get_basic_publishing_credentials_policies_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.CsmPublishingCredentialsPoliciesCollection": + """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + + Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesCollection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_basic_publishing_credentials_policies_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} # type: ignore + + async def get_ftp_allowed_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.CsmPublishingCredentialsPoliciesEntity": + """Returns whether FTP is allowed on the site or not. + + Description for Returns whether FTP is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ftp_allowed_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + + async def update_ftp_allowed_slot( + self, + resource_group_name: str, + name: str, + slot: str, + csm_publishing_access_policies_entity: "_models.CsmPublishingCredentialsPoliciesEntity", + **kwargs + ) -> "_models.CsmPublishingCredentialsPoliciesEntity": + """Updates whether FTP is allowed on the site or not. + + Description for Updates whether FTP is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :param csm_publishing_access_policies_entity: + :type csm_publishing_access_policies_entity: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_ftp_allowed_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + + async def get_scm_allowed_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.CsmPublishingCredentialsPoliciesEntity": + """Returns whether Scm basic auth is allowed on the site or not. + + Description for Returns whether Scm basic auth is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_scm_allowed_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + + async def update_scm_allowed_slot( + self, + resource_group_name: str, + name: str, + slot: str, + csm_publishing_access_policies_entity: "_models.CsmPublishingCredentialsPoliciesEntity", + **kwargs + ) -> "_models.CsmPublishingCredentialsPoliciesEntity": + """Updates whether user publishing credentials are allowed on the site or not. + + Description for Updates whether user publishing credentials are allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :param csm_publishing_access_policies_entity: + :type csm_publishing_access_policies_entity: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_scm_allowed_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + + def list_configurations_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: + """List the configurations of an app. + + Description for List the configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will return + configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteConfigResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_configurations_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SiteConfigResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + + async def update_application_settings_slot( + self, + resource_group_name: str, + name: str, + slot: str, + app_settings: "_models.StringDictionary", + **kwargs + ) -> "_models.StringDictionary": + """Replaces the application settings of an app. + + Description for Replaces the application settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + application settings for the production slot. + :type slot: str + :param app_settings: Application settings of the app. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_application_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + + async def list_application_settings_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.StringDictionary": + """Gets the application settings of an app. + + Description for Gets the application settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + application settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_application_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + + async def update_auth_settings_slot( + self, + resource_group_name: str, + name: str, + slot: str, + site_auth_settings: "_models.SiteAuthSettings", + **kwargs + ) -> "_models.SiteAuthSettings": + """Updates the Authentication / Authorization settings associated with web app. + + Description for Updates the Authentication / Authorization settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param site_auth_settings: Auth settings associated with web app. + :type site_auth_settings: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_auth_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + + async def get_auth_settings_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.SiteAuthSettings": + """Gets the Authentication/Authorization settings of an app. + + Description for Gets the Authentication/Authorization settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_auth_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + + async def update_auth_settings_v2_slot( + self, + resource_group_name: str, + name: str, + slot: str, + site_auth_settings_v2: "_models.SiteAuthSettingsV2", + **kwargs + ) -> "_models.SiteAuthSettingsV2": + """Updates site's Authentication / Authorization settings for apps via the V2 format. + + Description for Updates site's Authentication / Authorization settings for apps via the V2 + format. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param site_auth_settings_v2: Auth settings associated with web app. + :type site_auth_settings_v2: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettingsV2, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_auth_settings_v2_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + + async def get_auth_settings_v2_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.SiteAuthSettingsV2": + """Gets site's Authentication / Authorization settings for apps via the V2 format. + + Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettingsV2, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_auth_settings_v2_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + + async def update_azure_storage_accounts_slot( + self, + resource_group_name: str, + name: str, + slot: str, + azure_storage_accounts: "_models.AzureStoragePropertyDictionaryResource", + **kwargs + ) -> "_models.AzureStoragePropertyDictionaryResource": + """Updates the Azure storage account configurations of an app. + + Description for Updates the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + Azure storage account configurations for the production slot. + :type slot: str + :param azure_storage_accounts: Azure storage accounts of the app. + :type azure_storage_accounts: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureStoragePropertyDictionaryResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureStoragePropertyDictionaryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_azure_storage_accounts_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + + async def list_azure_storage_accounts_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.AzureStoragePropertyDictionaryResource": + """Gets the Azure storage account configurations of an app. + + Description for Gets the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + Azure storage account configurations for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureStoragePropertyDictionaryResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureStoragePropertyDictionaryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_azure_storage_accounts_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + + async def update_backup_configuration_slot( + self, + resource_group_name: str, + name: str, + slot: str, + request: "_models.BackupRequest", + **kwargs + ) -> "_models.BackupRequest": + """Updates the backup configuration of an app. + + Description for Updates the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + backup configuration for the production slot. + :type slot: str + :param request: Edited backup configuration. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_backup_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + + async def delete_backup_configuration_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Deletes the backup configuration of an app. + + Description for Deletes the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + backup configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_backup_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + + async def get_backup_configuration_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.BackupRequest": + """Gets the backup configuration of an app. + + Description for Gets the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + backup configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_backup_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + + def get_app_settings_key_vault_references_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: + """Gets the config reference app settings and status of an app. + + Description for Gets the config reference app settings and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApiKVReferenceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_app_settings_key_vault_references_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApiKVReferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} # type: ignore + + async def get_app_setting_key_vault_reference_slot( + self, + resource_group_name: str, + name: str, + app_setting_key: str, + slot: str, + **kwargs + ) -> "_models.ApiKVReference": + """Gets the config reference and status of an app. + + Description for Gets the config reference and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param app_setting_key: App Setting key name. + :type app_setting_key: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApiKVReference, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReference"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_app_setting_key_vault_reference_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'appSettingKey': self._serialize.url("app_setting_key", app_setting_key, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApiKVReference', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_app_setting_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + + def get_site_connection_string_key_vault_references_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: + """Gets the config reference app settings and status of an app. + + Description for Gets the config reference app settings and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApiKVReferenceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_site_connection_string_key_vault_references_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApiKVReferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} # type: ignore + + async def get_site_connection_string_key_vault_reference_slot( + self, + resource_group_name: str, + name: str, + connection_string_key: str, + slot: str, + **kwargs + ) -> "_models.ApiKVReference": + """Gets the config reference and status of an app. + + Description for Gets the config reference and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param connection_string_key: + :type connection_string_key: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApiKVReference, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReference"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_connection_string_key_vault_reference_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'connectionStringKey': self._serialize.url("connection_string_key", connection_string_key, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApiKVReference', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_connection_string_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + + async def update_connection_strings_slot( + self, + resource_group_name: str, + name: str, + slot: str, + connection_strings: "_models.ConnectionStringDictionary", + **kwargs + ) -> "_models.ConnectionStringDictionary": + """Replaces the connection strings of an app. + + Description for Replaces the connection strings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + connection settings for the production slot. + :type slot: str + :param connection_strings: Connection strings of the app or deployment slot. See example. + :type connection_strings: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionStringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionStringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_connection_strings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + + async def list_connection_strings_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.ConnectionStringDictionary": + """Gets the connection strings of an app. + + Description for Gets the connection strings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + connection settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionStringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionStringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_connection_strings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + + async def get_diagnostic_logs_configuration_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.SiteLogsConfig": + """Gets the logging configuration of an app. + + Description for Gets the logging configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + logging configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteLogsConfig, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteLogsConfig"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_diagnostic_logs_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteLogsConfig', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + + async def update_diagnostic_logs_config_slot( + self, + resource_group_name: str, + name: str, + slot: str, + site_logs_config: "_models.SiteLogsConfig", + **kwargs + ) -> "_models.SiteLogsConfig": + """Updates the logging configuration of an app. + + Description for Updates the logging configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + logging configuration for the production slot. + :type slot: str + :param site_logs_config: A SiteLogsConfig JSON object that contains the logging configuration + to change in the "properties" property. + :type site_logs_config: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteLogsConfig, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteLogsConfig"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_diagnostic_logs_config_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteLogsConfig', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + + async def update_metadata_slot( + self, + resource_group_name: str, + name: str, + slot: str, + metadata: "_models.StringDictionary", + **kwargs + ) -> "_models.StringDictionary": + """Replaces the metadata of an app. + + Description for Replaces the metadata of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + metadata for the production slot. + :type slot: str + :param metadata: Edited metadata of the app or deployment slot. See example. + :type metadata: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_metadata_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(metadata, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + + async def list_metadata_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.StringDictionary": + """Gets the metadata of an app. + + Description for Gets the metadata of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + metadata for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_metadata_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + + async def _list_publishing_credentials_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.User": + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._list_publishing_credentials_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + + async def begin_list_publishing_credentials_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncLROPoller["_models.User"]: + """Gets the Git/FTP publishing credentials of an app. + + Description for Gets the Git/FTP publishing credentials of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + publishing credentials for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_publishing_credentials_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + + async def update_site_push_settings_slot( + self, + resource_group_name: str, + name: str, + slot: str, + push_settings: "_models.PushSettings", + **kwargs + ) -> "_models.PushSettings": + """Updates the Push settings associated with web app. + + Description for Updates the Push settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param push_settings: Push settings associated with web app. + :type push_settings: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PushSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PushSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_site_push_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(push_settings, 'PushSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PushSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + + async def list_site_push_settings_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.PushSettings": + """Gets the Push settings associated with web app. + + Description for Gets the Push settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PushSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PushSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_site_push_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PushSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + + async def get_configuration_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.SiteConfigResource": + """Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + + Description for Gets the configuration of an app, such as platform version and bitness, default + documents, virtual applications, Always On, etc. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will return + configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + + async def create_or_update_configuration_slot( + self, + resource_group_name: str, + name: str, + slot: str, + site_config: "_models.SiteConfigResource", + **kwargs + ) -> "_models.SiteConfigResource": + """Updates the configuration of an app. + + Description for Updates the configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update + configuration for the production slot. + :type slot: str + :param site_config: JSON representation of a SiteConfig object. See example. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_config, 'SiteConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + + async def update_configuration_slot( + self, + resource_group_name: str, + name: str, + slot: str, + site_config: "_models.SiteConfigResource", + **kwargs + ) -> "_models.SiteConfigResource": + """Updates the configuration of an app. + + Description for Updates the configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update + configuration for the production slot. + :type slot: str + :param site_config: JSON representation of a SiteConfig object. See example. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_config, 'SiteConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + + def list_configuration_snapshot_info_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.SiteConfigurationSnapshotInfoCollection"]: + """Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + + Description for Gets a list of web app configuration snapshots identifiers. Each element of the + list contains a timestamp and the ID of the snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will return + configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteConfigurationSnapshotInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SiteConfigurationSnapshotInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + + async def get_configuration_snapshot_slot( + self, + resource_group_name: str, + name: str, + snapshot_id: str, + slot: str, + **kwargs + ) -> "_models.SiteConfigResource": + """Gets a snapshot of the configuration of an app at a previous point in time. + + Description for Gets a snapshot of the configuration of an app at a previous point in time. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param snapshot_id: The ID of the snapshot to read. + :type snapshot_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will return + configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_configuration_snapshot_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + + async def recover_site_configuration_snapshot_slot( + self, + resource_group_name: str, + name: str, + snapshot_id: str, + slot: str, + **kwargs + ) -> None: + """Reverts the configuration of an app to a previous snapshot. + + Description for Reverts the configuration of an app to a previous snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param snapshot_id: The ID of the snapshot to read. + :type snapshot_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will return + configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.recover_site_configuration_snapshot_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + + async def get_web_site_container_logs_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> Optional[IO]: + """Gets the last lines of docker logs for the given site. + + Description for Gets the last lines of docker logs for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/octet-stream" + + # Construct URL + url = self.get_web_site_container_logs_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + + async def get_container_logs_zip_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> Optional[IO]: + """Gets the ZIP archived docker log files for the given site. + + Description for Gets the ZIP archived docker log files for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/zip" + + # Construct URL + url = self.get_container_logs_zip_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + + def list_continuous_web_jobs_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: + """List continuous web jobs for an app, or a deployment slot. + + Description for List continuous web jobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContinuousWebJobCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ContinuousWebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + + async def get_continuous_web_job_slot( + self, + resource_group_name: str, + name: str, + web_job_name: str, + slot: str, + **kwargs + ) -> Optional["_models.ContinuousWebJob"]: + """Gets a continuous web job by its ID for an app, or a deployment slot. + + Description for Gets a continuous web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContinuousWebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ContinuousWebJob"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_continuous_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + + async def delete_continuous_web_job_slot( + self, + resource_group_name: str, + name: str, + web_job_name: str, + slot: str, + **kwargs + ) -> None: + """Delete a continuous web job by its ID for an app, or a deployment slot. + + Description for Delete a continuous web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_continuous_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + + async def start_continuous_web_job_slot( + self, + resource_group_name: str, + name: str, + web_job_name: str, + slot: str, + **kwargs + ) -> None: + """Start a continuous web job for an app, or a deployment slot. + + Description for Start a continuous web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start_continuous_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + + async def stop_continuous_web_job_slot( + self, + resource_group_name: str, + name: str, + web_job_name: str, + slot: str, + **kwargs + ) -> None: + """Stop a continuous web job for an app, or a deployment slot. + + Description for Stop a continuous web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_continuous_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + + def list_deployments_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.DeploymentCollection"]: + """List deployments for an app, or a deployment slot. + + Description for List deployments for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DeploymentCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_deployments_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DeploymentCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + + async def get_deployment_slot( + self, + resource_group_name: str, + name: str, + id: str, + slot: str, + **kwargs + ) -> "_models.Deployment": + """Get a deployment by its ID for an app, or a deployment slot. + + Description for Get a deployment by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: Deployment ID. + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API gets a deployment + for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_deployment_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + + async def create_deployment_slot( + self, + resource_group_name: str, + name: str, + id: str, + slot: str, + deployment: "_models.Deployment", + **kwargs + ) -> "_models.Deployment": + """Create a deployment for an app, or a deployment slot. + + Description for Create a deployment for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: ID of an existing deployment. + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API creates a + deployment for the production slot. + :type slot: str + :param deployment: Deployment details. + :type deployment: ~azure.mgmt.web.v2020_12_01.models.Deployment + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_deployment_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(deployment, 'Deployment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + + async def delete_deployment_slot( + self, + resource_group_name: str, + name: str, + id: str, + slot: str, + **kwargs + ) -> None: + """Delete a deployment by its ID for an app, or a deployment slot. + + Description for Delete a deployment by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: Deployment ID. + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_deployment_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + + async def list_deployment_log_slot( + self, + resource_group_name: str, + name: str, + id: str, + slot: str, + **kwargs + ) -> "_models.Deployment": + """List deployment log for specific deployment for an app, or a deployment slot. + + Description for List deployment log for specific deployment for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: The ID of a specific deployment. This is the value of the name property in the JSON + response from "GET /api/sites/{siteName}/deployments". + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_deployment_log_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + + async def discover_backup_slot( + self, + resource_group_name: str, + name: str, + slot: str, + request: "_models.RestoreRequest", + **kwargs + ) -> "_models.RestoreRequest": + """Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + + Description for Discovers an existing app backup that can be restored from a blob in Azure + storage. Use this to get information about the databases stored in a backup. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will perform + discovery for the production slot. + :type slot: str + :param request: A RestoreRequest object that includes Azure storage URL and blog name for + discovery of backup. + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RestoreRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.discover_backup_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RestoreRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + + def list_domain_ownership_identifiers_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.IdentifierCollection"]: + """Lists ownership identifiers for domain associated with web app. + + Description for Lists ownership identifiers for domain associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IdentifierCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IdentifierCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + + async def get_domain_ownership_identifier_slot( + self, + resource_group_name: str, + name: str, + domain_ownership_identifier_name: str, + slot: str, + **kwargs + ) -> "_models.Identifier": + """Get domain ownership identifier for web app. + + Description for Get domain ownership identifier for web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_domain_ownership_identifier_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + async def create_or_update_domain_ownership_identifier_slot( + self, + resource_group_name: str, + name: str, + domain_ownership_identifier_name: str, + slot: str, + domain_ownership_identifier: "_models.Identifier", + **kwargs + ) -> "_models.Identifier": + """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + + Description for Creates a domain ownership identifier for web app, or updates an existing + ownership identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.Identifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + async def delete_domain_ownership_identifier_slot( + self, + resource_group_name: str, + name: str, + domain_ownership_identifier_name: str, + slot: str, + **kwargs + ) -> None: + """Deletes a domain ownership identifier for a web app. + + Description for Deletes a domain ownership identifier for a web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_domain_ownership_identifier_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + async def update_domain_ownership_identifier_slot( + self, + resource_group_name: str, + name: str, + domain_ownership_identifier_name: str, + slot: str, + domain_ownership_identifier: "_models.Identifier", + **kwargs + ) -> "_models.Identifier": + """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + + Description for Creates a domain ownership identifier for web app, or updates an existing + ownership identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.Identifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_domain_ownership_identifier_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + async def get_ms_deploy_status_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.MSDeployStatus": + """Get the status of the last MSDeploy operation. + + Description for Get the status of the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ms_deploy_status_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + + async def _create_ms_deploy_operation_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + ms_deploy: "_models.MSDeploy", + **kwargs + ) -> Optional["_models.MSDeployStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployStatus"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_ms_deploy_operation_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + + async def begin_create_ms_deploy_operation_slot( + self, + resource_group_name: str, + name: str, + slot: str, + ms_deploy: "_models.MSDeploy", + **kwargs + ) -> AsyncLROPoller["_models.MSDeployStatus"]: + """Invoke the MSDeploy web app extension. + + Description for Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param ms_deploy: Details of MSDeploy operation. + :type ms_deploy: ~azure.mgmt.web.v2020_12_01.models.MSDeploy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + ms_deploy=ms_deploy, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + + async def get_ms_deploy_log_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> Optional["_models.MSDeployLog"]: + """Get the MSDeploy Log for the last MSDeploy operation. + + Description for Get the MSDeploy Log for the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployLog, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployLog"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ms_deploy_log_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + + def list_instance_functions_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: + """List the functions for a web site, or a deployment slot. + + Description for List the functions for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FunctionEnvelopeCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopeCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_functions_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('FunctionEnvelopeCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + + async def get_functions_admin_token_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> str: + """Fetch a short lived token that can be exchanged for a master key. + + Description for Fetch a short lived token that can be exchanged for a master key. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_functions_admin_token_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + + async def get_instance_function_slot( + self, + resource_group_name: str, + name: str, + function_name: str, + slot: str, + **kwargs + ) -> Optional["_models.FunctionEnvelope"]: + """Get function information by its ID for web site, or a deployment slot. + + Description for Get function information by its ID for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionEnvelope, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FunctionEnvelope"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_function_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + + async def _create_instance_function_slot_initial( + self, + resource_group_name: str, + name: str, + function_name: str, + slot: str, + function_envelope: "_models.FunctionEnvelope", + **kwargs + ) -> "_models.FunctionEnvelope": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_instance_function_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + + async def begin_create_instance_function_slot( + self, + resource_group_name: str, + name: str, + function_name: str, + slot: str, + function_envelope: "_models.FunctionEnvelope", + **kwargs + ) -> AsyncLROPoller["_models.FunctionEnvelope"]: + """Create function for web site, or a deployment slot. + + Description for Create function for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. + :type slot: str + :param function_envelope: Function details. + :type function_envelope: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FunctionEnvelope or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_instance_function_slot_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + slot=slot, + function_envelope=function_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + + async def delete_instance_function_slot( + self, + resource_group_name: str, + name: str, + function_name: str, + slot: str, + **kwargs + ) -> None: + """Delete a function for web site, or a deployment slot. + + Description for Delete a function for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_instance_function_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + + async def create_or_update_function_secret_slot( + self, + resource_group_name: str, + name: str, + function_name: str, + key_name: str, + slot: str, + key: "_models.KeyInfo", + **kwargs + ) -> "_models.KeyInfo": + """Add or update a function secret. + + Description for Add or update a function secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: The name of the function. + :type function_name: str + :param key_name: The name of the key. + :type key_name: str + :param slot: Name of the deployment slot. + :type slot: str + :param key: The key to create or update. + :type key: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KeyInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_function_secret_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key, 'KeyInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + + async def delete_function_secret_slot( + self, + resource_group_name: str, + name: str, + function_name: str, + key_name: str, + slot: str, + **kwargs + ) -> None: + """Delete a function secret. + + Description for Delete a function secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: The name of the function. + :type function_name: str + :param key_name: The name of the key. + :type key_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_function_secret_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + + async def list_function_keys_slot( + self, + resource_group_name: str, + name: str, + function_name: str, + slot: str, + **kwargs + ) -> "_models.StringDictionary": + """Get function keys for a function in a web site, or a deployment slot. + + Description for Get function keys for a function in a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_function_keys_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + + async def list_function_secrets_slot( + self, + resource_group_name: str, + name: str, + function_name: str, + slot: str, + **kwargs + ) -> "_models.FunctionSecrets": + """Get function secrets for a function in a web site, or a deployment slot. + + Description for Get function secrets for a function in a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_function_secrets_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + + async def list_host_keys_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.HostKeys": + """Get host secrets for a function app. + + Description for Get host secrets for a function app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostKeys, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_host_keys_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + + async def list_sync_status_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """This is to allow calling via powershell and ARM template. + + Description for This is to allow calling via powershell and ARM template. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_sync_status_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + + async def sync_functions_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Syncs function trigger metadata to the management database. + + Description for Syncs function trigger metadata to the management database. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_functions_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + + async def create_or_update_host_secret_slot( + self, + resource_group_name: str, + name: str, + key_type: str, + key_name: str, + slot: str, + key: "_models.KeyInfo", + **kwargs + ) -> "_models.KeyInfo": + """Add or update a host level secret. + + Description for Add or update a host level secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param key_type: The type of host key. + :type key_type: str + :param key_name: The name of the key. + :type key_name: str + :param slot: Name of the deployment slot. + :type slot: str + :param key: The key to create or update. + :type key: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KeyInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_host_secret_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'keyType': self._serialize.url("key_type", key_type, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key, 'KeyInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + + async def delete_host_secret_slot( + self, + resource_group_name: str, + name: str, + key_type: str, + key_name: str, + slot: str, + **kwargs + ) -> None: + """Delete a host level secret. + + Description for Delete a host level secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param key_type: The type of host key. + :type key_type: str + :param key_name: The name of the key. + :type key_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_host_secret_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'keyType': self._serialize.url("key_type", key_type, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + + def list_host_name_bindings_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.HostNameBindingCollection"]: + """Get hostname bindings for an app or a deployment slot. + + Description for Get hostname bindings for an app or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API gets hostname + bindings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HostNameBindingCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBindingCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_host_name_bindings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('HostNameBindingCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + + async def get_host_name_binding_slot( + self, + resource_group_name: str, + name: str, + slot: str, + host_name: str, + **kwargs + ) -> "_models.HostNameBinding": + """Get the named hostname binding for an app (or deployment slot, if specified). + + Description for Get the named hostname binding for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API the named binding + for the production slot. + :type slot: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostNameBinding, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBinding"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_host_name_binding_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostNameBinding', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + + async def create_or_update_host_name_binding_slot( + self, + resource_group_name: str, + name: str, + host_name: str, + slot: str, + host_name_binding: "_models.HostNameBinding", + **kwargs + ) -> "_models.HostNameBinding": + """Creates a hostname binding for an app. + + Description for Creates a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will create a + binding for the production slot. + :type slot: str + :param host_name_binding: Binding details. This is the JSON representation of a HostNameBinding + object. + :type host_name_binding: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostNameBinding, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBinding"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_host_name_binding_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostNameBinding', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + + async def delete_host_name_binding_slot( + self, + resource_group_name: str, + name: str, + slot: str, + host_name: str, + **kwargs + ) -> None: + """Deletes a hostname binding for an app. + + Description for Deletes a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_host_name_binding_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + + async def get_hybrid_connection_slot( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + slot: str, + **kwargs + ) -> "_models.HybridConnection": + """Retrieves a specific Service Bus Hybrid Connection used by this Web App. + + Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param slot: The name of the slot for the web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_hybrid_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + async def create_or_update_hybrid_connection_slot( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + slot: str, + connection_envelope: "_models.HybridConnection", + **kwargs + ) -> "_models.HybridConnection": + """Creates a new Hybrid Connection using a Service Bus relay. + + Description for Creates a new Hybrid Connection using a Service Bus relay. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param slot: The name of the slot for the web app. + :type slot: str + :param connection_envelope: The details of the hybrid connection. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_hybrid_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + async def delete_hybrid_connection_slot( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + slot: str, + **kwargs + ) -> None: + """Removes a Hybrid Connection from this site. + + Description for Removes a Hybrid Connection from this site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param slot: The name of the slot for the web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_hybrid_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + async def update_hybrid_connection_slot( + self, + resource_group_name: str, + name: str, + namespace_name: str, + relay_name: str, + slot: str, + connection_envelope: "_models.HybridConnection", + **kwargs + ) -> "_models.HybridConnection": + """Creates a new Hybrid Connection using a Service Bus relay. + + Description for Creates a new Hybrid Connection using a Service Bus relay. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param slot: The name of the slot for the web app. + :type slot: str + :param connection_envelope: The details of the hybrid connection. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_hybrid_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + async def list_hybrid_connections_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.HybridConnection": + """Retrieves all Service Bus Hybrid Connections used by this Web App. + + Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for the web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_hybrid_connections_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + + async def list_relay_service_connections_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.RelayServiceConnectionEntity": + """Gets hybrid connections configured for an app (or deployment slot, if specified). + + Description for Gets hybrid connections configured for an app (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get hybrid + connections for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_relay_service_connections_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + + async def get_relay_service_connection_slot( + self, + resource_group_name: str, + name: str, + entity_name: str, + slot: str, + **kwargs + ) -> "_models.RelayServiceConnectionEntity": + """Gets a hybrid connection configuration by its name. + + Description for Gets a hybrid connection configuration by its name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection. + :type entity_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get a hybrid + connection for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_relay_service_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + + async def create_or_update_relay_service_connection_slot( + self, + resource_group_name: str, + name: str, + entity_name: str, + slot: str, + connection_envelope: "_models.RelayServiceConnectionEntity", + **kwargs + ) -> "_models.RelayServiceConnectionEntity": + """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + + Description for Creates a new hybrid connection configuration (PUT), or updates an existing one + (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will create or + update a hybrid connection for the production slot. + :type slot: str + :param connection_envelope: Details of the hybrid connection configuration. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_relay_service_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + + async def delete_relay_service_connection_slot( + self, + resource_group_name: str, + name: str, + entity_name: str, + slot: str, + **kwargs + ) -> None: + """Deletes a relay service connection by its name. + + Description for Deletes a relay service connection by its name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete a + hybrid connection for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_relay_service_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + + async def update_relay_service_connection_slot( + self, + resource_group_name: str, + name: str, + entity_name: str, + slot: str, + connection_envelope: "_models.RelayServiceConnectionEntity", + **kwargs + ) -> "_models.RelayServiceConnectionEntity": + """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + + Description for Creates a new hybrid connection configuration (PUT), or updates an existing one + (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will create or + update a hybrid connection for the production slot. + :type slot: str + :param connection_envelope: Details of the hybrid connection configuration. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_relay_service_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + + def list_instance_identifiers_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: + """Gets all scale-out instances of an app. + + Description for Gets all scale-out instances of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API gets the + production slot instances. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppInstanceStatusCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppInstanceStatusCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_identifiers_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppInstanceStatusCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + + async def get_instance_info_slot( + self, + resource_group_name: str, + name: str, + instance_id: str, + slot: str, + **kwargs + ) -> "_models.WebSiteInstanceStatus": + """Gets all scale-out instances of an app. + + Description for Gets all scale-out instances of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param instance_id: + :type instance_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API gets the + production slot instances. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebSiteInstanceStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebSiteInstanceStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_info_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + + async def get_instance_ms_deploy_status_slot( + self, + resource_group_name: str, + name: str, + slot: str, + instance_id: str, + **kwargs + ) -> "_models.MSDeployStatus": + """Get the status of the last MSDeploy operation. + + Description for Get the status of the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param instance_id: ID of web app instance. + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_ms_deploy_status_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + async def _create_instance_ms_deploy_operation_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + instance_id: str, + ms_deploy: "_models.MSDeploy", + **kwargs + ) -> Optional["_models.MSDeployStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployStatus"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_instance_ms_deploy_operation_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + async def begin_create_instance_ms_deploy_operation_slot( + self, + resource_group_name: str, + name: str, + slot: str, + instance_id: str, + ms_deploy: "_models.MSDeploy", + **kwargs + ) -> AsyncLROPoller["_models.MSDeployStatus"]: + """Invoke the MSDeploy web app extension. + + Description for Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param instance_id: ID of web app instance. + :type instance_id: str + :param ms_deploy: Details of MSDeploy operation. + :type ms_deploy: ~azure.mgmt.web.v2020_12_01.models.MSDeploy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MSDeployStatus or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_instance_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + instance_id=instance_id, + ms_deploy=ms_deploy, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + async def get_instance_ms_deploy_log_slot( + self, + resource_group_name: str, + name: str, + slot: str, + instance_id: str, + **kwargs + ) -> Optional["_models.MSDeployLog"]: + """Get the MSDeploy Log for the last MSDeploy operation. + + Description for Get the MSDeploy Log for the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param instance_id: ID of web app instance. + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployLog, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployLog"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_ms_deploy_log_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + + def list_instance_processes_slot( + self, + resource_group_name: str, + name: str, + slot: str, + instance_id: str, + **kwargs + ) -> AsyncIterable["_models.ProcessInfoCollection"]: + """Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + + Description for Get list of processes for a web site, or a deployment slot, or for a specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_processes_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + + async def get_instance_process_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + slot: str, + instance_id: str, + **kwargs + ) -> Optional["_models.ProcessInfo"]: + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + + async def delete_instance_process_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + slot: str, + instance_id: str, + **kwargs + ) -> None: + """Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + + Description for Terminate a process by its ID for a web site, or a deployment slot, or specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_instance_process_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + + async def get_instance_process_dump_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + slot: str, + instance_id: str, + **kwargs + ) -> Optional[IO]: + """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + + Description for Get a memory dump of a process by its ID for a specific scaled-out instance in + a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process_dump_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + + def list_instance_process_modules_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + slot: str, + instance_id: str, + **kwargs + ) -> AsyncIterable["_models.ProcessModuleInfoCollection"]: + """List module information for a process by its ID for a specific scaled-out instance in a web site. + + Description for List module information for a process by its ID for a specific scaled-out + instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessModuleInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_process_modules_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessModuleInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + + async def get_instance_process_module_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + base_address: str, + slot: str, + instance_id: str, + **kwargs + ) -> Optional["_models.ProcessModuleInfo"]: + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param base_address: Module base address. + :type base_address: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessModuleInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessModuleInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process_module_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'baseAddress': self._serialize.url("base_address", base_address, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + + def list_instance_process_threads_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + slot: str, + instance_id: str, + **kwargs + ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: + """List the threads in a process by its ID for a specific scaled-out instance in a web site. + + Description for List the threads in a process by its ID for a specific scaled-out instance in a + web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessThreadInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_process_threads_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessThreadInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + + async def is_cloneable_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.SiteCloneability": + """Shows whether an app can be cloned to another resource group or subscription. + + Description for Shows whether an app can be cloned to another resource group or subscription. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. By default, this API returns information on the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteCloneability, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteCloneability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteCloneability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.is_cloneable_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteCloneability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + + def list_site_backups_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.BackupItemCollection"]: + """Gets existing backups of an app. + + Description for Gets existing backups of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get backups + of the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupItemCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_backups_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BackupItemCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + + async def list_sync_function_triggers_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.FunctionSecrets": + """This is to allow calling via powershell and ARM template. + + Description for This is to allow calling via powershell and ARM template. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_sync_function_triggers_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + + async def get_migrate_my_sql_status_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.MigrateMySqlStatus": + """Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + + Description for Returns the status of MySql in app migration, if one is active, and whether or + not MySql in app is enabled. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MigrateMySqlStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MigrateMySqlStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MigrateMySqlStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_migrate_my_sql_status_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + + async def get_swift_virtual_network_connection_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.SwiftVirtualNetwork": + """Gets a Swift Virtual Network connection. + + Description for Gets a Swift Virtual Network connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get a + gateway for the production slot's Virtual Network. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SwiftVirtualNetwork, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SwiftVirtualNetwork + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SwiftVirtualNetwork"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_swift_virtual_network_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + + async def delete_swift_virtual_network_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Deletes a Swift Virtual Network connection from an app (or deployment slot). + + Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + connection for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_swift_virtual_network_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + + async def list_network_features_slot( + self, + resource_group_name: str, + name: str, + view: str, + slot: str, + **kwargs + ) -> Optional["_models.NetworkFeatures"]: + """Gets all network features used by the app (or deployment slot, if specified). + + Description for Gets all network features used by the app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param view: The type of view. Only "summary" is supported at this time. + :type view: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get network + features for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkFeatures, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.NetworkFeatures or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetworkFeatures"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_network_features_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'view': self._serialize.url("view", view, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + + async def get_network_trace_operation_slot( + self, + resource_group_name: str, + name: str, + operation_id: str, + slot: str, + **kwargs + ) -> List["_models.NetworkTrace"]: + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get an + operation for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_trace_operation_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + + async def start_web_site_network_trace_slot( + self, + resource_group_name: str, + name: str, + slot: str, + duration_in_seconds: Optional[int] = None, + max_frame_length: Optional[int] = None, + sas_url: Optional[str] = None, + **kwargs + ) -> str: + """Start capturing network packets for the site (To be deprecated). + + Description for Start capturing network packets for the site (To be deprecated). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start_web_site_network_trace_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + + async def _start_web_site_network_trace_operation_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + duration_in_seconds: Optional[int] = None, + max_frame_length: Optional[int] = None, + sas_url: Optional[str] = None, + **kwargs + ) -> List["_models.NetworkTrace"]: + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._start_web_site_network_trace_operation_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + + async def begin_start_web_site_network_trace_operation_slot( + self, + resource_group_name: str, + name: str, + slot: str, + duration_in_seconds: Optional[int] = None, + max_frame_length: Optional[int] = None, + sas_url: Optional[str] = None, + **kwargs + ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: + """Start capturing network packets for the site. + + Description for Start capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_web_site_network_trace_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + + async def stop_web_site_network_trace_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Stop ongoing capturing network packets for the site. + + Description for Stop ongoing capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_web_site_network_trace_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + + async def get_network_traces_slot( + self, + resource_group_name: str, + name: str, + operation_id: str, + slot: str, + **kwargs + ) -> List["_models.NetworkTrace"]: + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get an + operation for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_traces_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + + async def get_network_trace_operation_slot_v2( + self, + resource_group_name: str, + name: str, + operation_id: str, + slot: str, + **kwargs + ) -> List["_models.NetworkTrace"]: + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get an + operation for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_trace_operation_slot_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + + async def get_network_traces_slot_v2( + self, + resource_group_name: str, + name: str, + operation_id: str, + slot: str, + **kwargs + ) -> List["_models.NetworkTrace"]: + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get an + operation for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_traces_slot_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + + async def generate_new_site_publishing_password_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Generates a new publishing password for an app (or deployment slot, if specified). + + Description for Generates a new publishing password for an app (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API generate a new + publishing password for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.generate_new_site_publishing_password_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + + def list_perf_mon_counters_slot( + self, + resource_group_name: str, + name: str, + slot: str, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.PerfMonCounterCollection"]: + """Gets perfmon counters for web app. + + Description for Gets perfmon counters for web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param filter: Return only usages/metrics specified in the filter. Filter conforms to odata + syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z + and timeGrain eq duration'[Hour|Minute|Day]'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PerfMonCounterCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PerfMonCounterCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_perf_mon_counters_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PerfMonCounterCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + + async def get_site_php_error_log_flag_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.SitePhpErrorLogFlag": + """Gets web app's event logs. + + Description for Gets web app's event logs. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SitePhpErrorLogFlag, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SitePhpErrorLogFlag + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SitePhpErrorLogFlag"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_php_error_log_flag_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + + async def list_premier_add_ons_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.PremierAddOn": + """Gets the premier add-ons of an app. + + Description for Gets the premier add-ons of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + premier add-ons for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_premier_add_ons_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + + async def get_premier_add_on_slot( + self, + resource_group_name: str, + name: str, + premier_add_on_name: str, + slot: str, + **kwargs + ) -> "_models.PremierAddOn": + """Gets a named add-on of an app. + + Description for Gets a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + named add-on for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_premier_add_on_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + + async def add_premier_add_on_slot( + self, + resource_group_name: str, + name: str, + premier_add_on_name: str, + slot: str, + premier_add_on: "_models.PremierAddOn", + **kwargs + ) -> "_models.PremierAddOn": + """Updates a named add-on of an app. + + Description for Updates a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + named add-on for the production slot. + :type slot: str + :param premier_add_on: A JSON representation of the edited premier add-on. + :type premier_add_on: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.add_premier_add_on_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + + async def delete_premier_add_on_slot( + self, + resource_group_name: str, + name: str, + premier_add_on_name: str, + slot: str, + **kwargs + ) -> None: + """Delete a premier add-on from an app. + + Description for Delete a premier add-on from an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + named add-on for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_premier_add_on_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + + async def update_premier_add_on_slot( + self, + resource_group_name: str, + name: str, + premier_add_on_name: str, + slot: str, + premier_add_on: "_models.PremierAddOnPatchResource", + **kwargs + ) -> "_models.PremierAddOn": + """Updates a named add-on of an app. + + Description for Updates a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + named add-on for the production slot. + :type slot: str + :param premier_add_on: A JSON representation of the edited premier add-on. + :type premier_add_on: ~azure.mgmt.web.v2020_12_01.models.PremierAddOnPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_premier_add_on_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + + async def get_private_access_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.PrivateAccess": + """Gets data around private site access enablement and authorized Virtual Networks that can access the site. + + Description for Gets data around private site access enablement and authorized Virtual Networks + that can access the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for the web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateAccess, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateAccess"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_access_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + + async def put_private_access_vnet_slot( + self, + resource_group_name: str, + name: str, + slot: str, + access: "_models.PrivateAccess", + **kwargs + ) -> "_models.PrivateAccess": + """Sets data around private site access enablement and authorized Virtual Networks that can access the site. + + Description for Sets data around private site access enablement and authorized Virtual Networks + that can access the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for the web app. + :type slot: str + :param access: The information for the private access. + :type access: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateAccess, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateAccess"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put_private_access_vnet_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(access, 'PrivateAccess') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + + def get_private_endpoint_connection_list_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: + """Gets the list of private endpoint connections associated with a site. + + Description for Gets the list of private endpoint connections associated with a site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param slot: Name of the site deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} # type: ignore + + async def get_private_endpoint_connection_slot( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + slot: str, + **kwargs + ) -> "_models.RemotePrivateEndpointConnectionARMResource": + """Gets a private endpoint connection. + + Description for Gets a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param slot: Name of the site deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RemotePrivateEndpointConnectionARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_endpoint_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _approve_or_reject_private_endpoint_connection_slot_initial( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + slot: str, + private_endpoint_wrapper: "_models.PrivateLinkConnectionApprovalRequestResource", + **kwargs + ) -> "_models.RemotePrivateEndpointConnectionARMResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._approve_or_reject_private_endpoint_connection_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_approve_or_reject_private_endpoint_connection_slot( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + slot: str, + private_endpoint_wrapper: "_models.PrivateLinkConnectionApprovalRequestResource", + **kwargs + ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: + """Approves or rejects a private endpoint connection. + + Description for Approves or rejects a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param slot: + :type slot: str + :param private_endpoint_wrapper: + :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionApprovalRequestResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RemotePrivateEndpointConnectionARMResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._approve_or_reject_private_endpoint_connection_slot_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + slot=slot, + private_endpoint_wrapper=private_endpoint_wrapper, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_private_endpoint_connection_slot_initial( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + slot: str, + **kwargs + ) -> object: + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_private_endpoint_connection_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 204: + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete_private_endpoint_connection_slot( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + slot: str, + **kwargs + ) -> AsyncLROPoller[object]: + """Deletes a private endpoint connection. + + Description for Deletes a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either object or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[object] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[object] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_private_endpoint_connection_slot_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + slot=slot, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def get_private_link_resources_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.PrivateLinkResourcesWrapper": + """Gets the private link resources. + + Description for Gets the private link resources. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesWrapper, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesWrapper"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_link_resources_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} # type: ignore + + def list_processes_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.ProcessInfoCollection"]: + """Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + + Description for Get list of processes for a web site, or a deployment slot, or for a specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_processes_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + + async def get_process_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + slot: str, + **kwargs + ) -> Optional["_models.ProcessInfo"]: + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + + async def delete_process_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + slot: str, + **kwargs + ) -> None: + """Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + + Description for Terminate a process by its ID for a web site, or a deployment slot, or specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_process_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + + async def get_process_dump_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + slot: str, + **kwargs + ) -> Optional[IO]: + """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + + Description for Get a memory dump of a process by its ID for a specific scaled-out instance in + a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process_dump_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + + def list_process_modules_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.ProcessModuleInfoCollection"]: + """List module information for a process by its ID for a specific scaled-out instance in a web site. + + Description for List module information for a process by its ID for a specific scaled-out + instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessModuleInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_process_modules_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessModuleInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + + async def get_process_module_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + base_address: str, + slot: str, + **kwargs + ) -> Optional["_models.ProcessModuleInfo"]: + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param base_address: Module base address. + :type base_address: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessModuleInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessModuleInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process_module_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'baseAddress': self._serialize.url("base_address", base_address, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + + def list_process_threads_slot( + self, + resource_group_name: str, + name: str, + process_id: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: + """List the threads in a process by its ID for a specific scaled-out instance in a web site. + + Description for List the threads in a process by its ID for a specific scaled-out instance in a + web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessThreadInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_process_threads_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessThreadInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + + def list_public_certificates_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.PublicCertificateCollection"]: + """Get public certificates for an app or a deployment slot. + + Description for Get public certificates for an app or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API gets hostname + bindings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicCertificateCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificateCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_public_certificates_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PublicCertificateCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + + async def get_public_certificate_slot( + self, + resource_group_name: str, + name: str, + slot: str, + public_certificate_name: str, + **kwargs + ) -> "_models.PublicCertificate": + """Get the named public certificate for an app (or deployment slot, if specified). + + Description for Get the named public certificate for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API the named binding + for the production slot. + :type slot: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_public_certificate_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + + async def create_or_update_public_certificate_slot( + self, + resource_group_name: str, + name: str, + public_certificate_name: str, + slot: str, + public_certificate: "_models.PublicCertificate", + **kwargs + ) -> "_models.PublicCertificate": + """Creates a hostname binding for an app. + + Description for Creates a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will create a + binding for the production slot. + :type slot: str + :param public_certificate: Public certificate details. This is the JSON representation of a + PublicCertificate object. + :type public_certificate: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_public_certificate_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + + async def delete_public_certificate_slot( + self, + resource_group_name: str, + name: str, + slot: str, + public_certificate_name: str, + **kwargs + ) -> None: + """Deletes a hostname binding for an app. + + Description for Deletes a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_public_certificate_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + + async def list_publishing_profile_xml_with_secrets_slot( + self, + resource_group_name: str, + name: str, + slot: str, + publishing_profile_options: "_models.CsmPublishingProfileOptions", + **kwargs + ) -> IO: + """Gets the publishing profile for an app (or deployment slot, if specified). + + Description for Gets the publishing profile for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + publishing profile for the production slot. + :type slot: str + :param publishing_profile_options: Specifies publishingProfileOptions for publishing profile. + For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + :type publishing_profile_options: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingProfileOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[IO] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/xml" + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + + async def reset_slot_configuration_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + + Description for Resets the configuration settings of the current slot if they were previously + modified by calling the API with POST. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API resets + configuration settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reset_slot_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + + async def restart_slot( + self, + resource_group_name: str, + name: str, + slot: str, + soft_restart: Optional[bool] = None, + synchronous: Optional[bool] = None, + **kwargs + ) -> None: + """Restarts an app (or deployment slot, if specified). + + Description for Restarts an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will restart the + production slot. + :type slot: str + :param soft_restart: Specify true to apply the configuration settings and restarts the app only + if necessary. By default, the API always restarts and reprovisions the app. + :type soft_restart: bool + :param synchronous: Specify true to block until the app is restarted. By default, it is set to + false, and the API responds immediately (asynchronous). + :type synchronous: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.restart_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + if synchronous is not None: + query_parameters['synchronous'] = self._serialize.query("synchronous", synchronous, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + + async def _restore_from_backup_blob_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + request: "_models.RestoreRequest", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_from_backup_blob_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + + async def begin_restore_from_backup_blob_slot( + self, + resource_group_name: str, + name: str, + slot: str, + request: "_models.RestoreRequest", + **kwargs + ) -> AsyncLROPoller[None]: + """Restores an app from a backup blob in Azure Storage. + + Description for Restores an app from a backup blob in Azure Storage. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will restore a + backup of the production slot. + :type slot: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restore_from_backup_blob_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + + async def _restore_from_deleted_app_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + restore_request: "_models.DeletedAppRestoreRequest", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_from_deleted_app_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + + async def begin_restore_from_deleted_app_slot( + self, + resource_group_name: str, + name: str, + slot: str, + restore_request: "_models.DeletedAppRestoreRequest", + **kwargs + ) -> AsyncLROPoller[None]: + """Restores a deleted web app to this web app. + + Description for Restores a deleted web app to this web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param restore_request: Deleted web app restore information. + :type restore_request: ~azure.mgmt.web.v2020_12_01.models.DeletedAppRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restore_from_deleted_app_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + restore_request=restore_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + + async def _restore_snapshot_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + restore_request: "_models.SnapshotRestoreRequest", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_snapshot_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + + async def begin_restore_snapshot_slot( + self, + resource_group_name: str, + name: str, + slot: str, + restore_request: "_models.SnapshotRestoreRequest", + **kwargs + ) -> AsyncLROPoller[None]: + """Restores a web app from a snapshot. + + Description for Restores a web app from a snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param restore_request: Snapshot restore settings. Snapshot information can be obtained by + calling GetDeletedSites or GetSiteSnapshots API. + :type restore_request: ~azure.mgmt.web.v2020_12_01.models.SnapshotRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restore_snapshot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + restore_request=restore_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + + def list_site_extensions_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: + """Get list of siteextensions for a web site, or a deployment slot. + + Description for Get list of siteextensions for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteExtensionInfoCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_extensions_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SiteExtensionInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + + async def get_site_extension_slot( + self, + resource_group_name: str, + name: str, + site_extension_id: str, + slot: str, + **kwargs + ) -> Optional["_models.SiteExtensionInfo"]: + """Get site extension information by its ID for a web site, or a deployment slot. + + Description for Get site extension information by its ID for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteExtensionInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SiteExtensionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_extension_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + + async def _install_site_extension_slot_initial( + self, + resource_group_name: str, + name: str, + site_extension_id: str, + slot: str, + **kwargs + ) -> Optional["_models.SiteExtensionInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SiteExtensionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._install_site_extension_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.put(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 429]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + + async def begin_install_site_extension_slot( + self, + resource_group_name: str, + name: str, + site_extension_id: str, + slot: str, + **kwargs + ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: + """Install site extension on a web site, or a deployment slot. + + Description for Install site extension on a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SiteExtensionInfo or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._install_site_extension_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + slot=slot, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + + async def delete_site_extension_slot( + self, + resource_group_name: str, + name: str, + site_extension_id: str, + slot: str, + **kwargs + ) -> None: + """Remove a site extension from a web site, or a deployment slot. + + Description for Remove a site extension from a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_site_extension_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + + def list_slot_differences_slot( + self, + resource_group_name: str, + name: str, + slot: str, + slot_swap_entity: "_models.CsmSlotEntity", + **kwargs + ) -> AsyncIterable["_models.SlotDifferenceCollection"]: + """Get the difference in configuration settings between two web app slots. + + Description for Get the difference in configuration settings between two web app slots. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the source slot. If a slot is not specified, the production slot is used + as the source slot. + :type slot: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SlotDifferenceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SlotDifferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_slot_differences_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SlotDifferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + + async def _swap_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + slot_swap_entity: "_models.CsmSlotEntity", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._swap_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + + async def begin_swap_slot( + self, + resource_group_name: str, + name: str, + slot: str, + slot_swap_entity: "_models.CsmSlotEntity", + **kwargs + ) -> AsyncLROPoller[None]: + """Swaps two deployment slots of an app. + + Description for Swaps two deployment slots of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the source slot. If a slot is not specified, the production slot is used + as the source slot. + :type slot: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._swap_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + slot_swap_entity=slot_swap_entity, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + + def list_snapshots_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.SnapshotCollection"]: + """Returns all Snapshots to the user. + + Description for Returns all Snapshots to the user. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Website Name. + :type name: str + :param slot: Website Slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_snapshots_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + + def list_snapshots_from_dr_secondary_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.SnapshotCollection"]: + """Returns all Snapshots to the user from DRSecondary endpoint. + + Description for Returns all Snapshots to the user from DRSecondary endpoint. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Website Name. + :type name: str + :param slot: Website Slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + + async def get_source_control_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> "_models.SiteSourceControl": + """Gets the source control configuration of an app. + + Description for Gets the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + source control configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteSourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_source_control_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + + async def _create_or_update_source_control_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + site_source_control: "_models.SiteSourceControl", + **kwargs + ) -> "_models.SiteSourceControl": + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_source_control_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + + async def begin_create_or_update_source_control_slot( + self, + resource_group_name: str, + name: str, + slot: str, + site_source_control: "_models.SiteSourceControl", + **kwargs + ) -> AsyncLROPoller["_models.SiteSourceControl"]: + """Updates the source control configuration of an app. + + Description for Updates the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + source control configuration for the production slot. + :type slot: str + :param site_source_control: JSON representation of a SiteSourceControl object. See example. + :type site_source_control: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_source_control_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + site_source_control=site_source_control, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + + async def delete_source_control_slot( + self, + resource_group_name: str, + name: str, + slot: str, + additional_flags: Optional[str] = None, + **kwargs + ) -> None: + """Deletes the source control configuration of an app. + + Description for Deletes the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + source control configuration for the production slot. + :type slot: str + :param additional_flags: + :type additional_flags: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_source_control_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if additional_flags is not None: + query_parameters['additionalFlags'] = self._serialize.query("additional_flags", additional_flags, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + + async def update_source_control_slot( + self, + resource_group_name: str, + name: str, + slot: str, + site_source_control: "_models.SiteSourceControl", + **kwargs + ) -> "_models.SiteSourceControl": + """Updates the source control configuration of an app. + + Description for Updates the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + source control configuration for the production slot. + :type slot: str + :param site_source_control: JSON representation of a SiteSourceControl object. See example. + :type site_source_control: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteSourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_source_control_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + + async def start_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Starts an app (or deployment slot, if specified). + + Description for Starts an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will start the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + + async def _start_network_trace_slot_initial( + self, + resource_group_name: str, + name: str, + slot: str, + duration_in_seconds: Optional[int] = None, + max_frame_length: Optional[int] = None, + sas_url: Optional[str] = None, + **kwargs + ) -> List["_models.NetworkTrace"]: + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._start_network_trace_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + + async def begin_start_network_trace_slot( + self, + resource_group_name: str, + name: str, + slot: str, + duration_in_seconds: Optional[int] = None, + max_frame_length: Optional[int] = None, + sas_url: Optional[str] = None, + **kwargs + ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: + """Start capturing network packets for the site. + + Description for Start capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_network_trace_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + + async def stop_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Stops an app (or deployment slot, if specified). + + Description for Stops an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will stop the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + + async def stop_network_trace_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Stop ongoing capturing network packets for the site. + + Description for Stop ongoing capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_network_trace_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + + async def sync_repository_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Sync web app repository. + + Description for Sync web app repository. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_repository_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + + async def sync_function_triggers_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> None: + """Syncs function trigger metadata to the management database. + + Description for Syncs function trigger metadata to the management database. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_function_triggers_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + + def list_triggered_web_jobs_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: + """List triggered web jobs for an app, or a deployment slot. + + Description for List triggered web jobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TriggeredWebJobCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('TriggeredWebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + + async def get_triggered_web_job_slot( + self, + resource_group_name: str, + name: str, + web_job_name: str, + slot: str, + **kwargs + ) -> Optional["_models.TriggeredWebJob"]: + """Gets a triggered web job by its ID for an app, or a deployment slot. + + Description for Gets a triggered web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TriggeredWebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TriggeredWebJob"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_triggered_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + + async def delete_triggered_web_job_slot( + self, + resource_group_name: str, + name: str, + web_job_name: str, + slot: str, + **kwargs + ) -> None: + """Delete a triggered web job by its ID for an app, or a deployment slot. + + Description for Delete a triggered web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes web job + for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_triggered_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + + def list_triggered_web_job_history_slot( + self, + resource_group_name: str, + name: str, + web_job_name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: + """List a triggered web job's history for an app, or a deployment slot. + + Description for List a triggered web job's history for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TriggeredJobHistoryCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('TriggeredJobHistoryCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + + async def get_triggered_web_job_history_slot( + self, + resource_group_name: str, + name: str, + web_job_name: str, + id: str, + slot: str, + **kwargs + ) -> Optional["_models.TriggeredJobHistory"]: + """Gets a triggered web job's history by its ID for an app, , or a deployment slot. + + Description for Gets a triggered web job's history by its ID for an app, , or a deployment + slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param id: History ID. + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TriggeredJobHistory, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TriggeredJobHistory"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_triggered_web_job_history_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + + async def run_triggered_web_job_slot( + self, + resource_group_name: str, + name: str, + web_job_name: str, + slot: str, + **kwargs + ) -> None: + """Run a triggered web job for an app, or a deployment slot. + + Description for Run a triggered web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.run_triggered_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + + def list_usages_slot( + self, + resource_group_name: str, + name: str, + slot: str, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: + """Gets the quota usage information of an app (or deployment slot, if specified). + + Description for Gets the quota usage information of an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get quota + information of the production slot. + :type slot: str + :param filter: Return only information specified in the filter (using OData syntax). For + example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq + 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + duration'[Hour|Minute|Day]'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmUsageQuotaCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_usages_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CsmUsageQuotaCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + + async def list_vnet_connections_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> List["_models.VnetInfo"]: + """Gets the virtual networks the app (or deployment slot) is connected to. + + Description for Gets the virtual networks the app (or deployment slot) is connected to. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get virtual + network connections for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of VnetInfo, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.VnetInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_vnet_connections_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[VnetInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + + async def get_vnet_connection_slot( + self, + resource_group_name: str, + name: str, + vnet_name: str, + slot: str, + **kwargs + ) -> "_models.VnetInfo": + """Gets a virtual network the app (or deployment slot) is connected to by name. + + Description for Gets a virtual network the app (or deployment slot) is connected to by name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the virtual network. + :type vnet_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + named virtual network for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + + async def create_or_update_vnet_connection_slot( + self, + resource_group_name: str, + name: str, + vnet_name: str, + slot: str, + connection_envelope: "_models.VnetInfo", + **kwargs + ) -> "_models.VnetInfo": + """Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + + Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the + connection properties (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of an existing Virtual Network. + :type vnet_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will add or + update connections for the production slot. + :type slot: str + :param connection_envelope: Properties of the Virtual Network connection. See example. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_vnet_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + + async def delete_vnet_connection_slot( + self, + resource_group_name: str, + name: str, + vnet_name: str, + slot: str, + **kwargs + ) -> None: + """Deletes a connection from an app (or deployment slot to a named virtual network. + + Description for Deletes a connection from an app (or deployment slot to a named virtual + network. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the virtual network. + :type vnet_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + connection for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_vnet_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + + async def update_vnet_connection_slot( + self, + resource_group_name: str, + name: str, + vnet_name: str, + slot: str, + connection_envelope: "_models.VnetInfo", + **kwargs + ) -> "_models.VnetInfo": + """Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + + Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the + connection properties (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of an existing Virtual Network. + :type vnet_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will add or + update connections for the production slot. + :type slot: str + :param connection_envelope: Properties of the Virtual Network connection. See example. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + + async def get_vnet_connection_gateway_slot( + self, + resource_group_name: str, + name: str, + vnet_name: str, + gateway_name: str, + slot: str, + **kwargs + ) -> Optional["_models.VnetGateway"]: + """Gets an app's Virtual Network gateway. + + Description for Gets an app's Virtual Network gateway. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get a + gateway for the production slot's Virtual Network. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VnetGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_connection_gateway_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + async def create_or_update_vnet_connection_gateway_slot( + self, + resource_group_name: str, + name: str, + vnet_name: str, + gateway_name: str, + slot: str, + connection_envelope: "_models.VnetGateway", + **kwargs + ) -> "_models.VnetGateway": + """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will add or + update a gateway for the production slot's Virtual Network. + :type slot: str + :param connection_envelope: The properties to update this gateway with. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + async def update_vnet_connection_gateway_slot( + self, + resource_group_name: str, + name: str, + vnet_name: str, + gateway_name: str, + slot: str, + connection_envelope: "_models.VnetGateway", + **kwargs + ) -> "_models.VnetGateway": + """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will add or + update a gateway for the production slot's Virtual Network. + :type slot: str + :param connection_envelope: The properties to update this gateway with. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_connection_gateway_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + def list_web_jobs_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs + ) -> AsyncIterable["_models.WebJobCollection"]: + """List webjobs for an app, or a deployment slot. + + Description for List webjobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebJobCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_jobs_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + + async def get_web_job_slot( + self, + resource_group_name: str, + name: str, + web_job_name: str, + slot: str, + **kwargs + ) -> "_models.WebJob": + """Get webjob information for an app, or a deployment slot. + + Description for Get webjob information for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of the web job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebJob + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJob"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + + def list_slot_differences_from_production( + self, + resource_group_name: str, + name: str, + slot_swap_entity: "_models.CsmSlotEntity", + **kwargs + ) -> AsyncIterable["_models.SlotDifferenceCollection"]: + """Get the difference in configuration settings between two web app slots. + + Description for Get the difference in configuration settings between two web app slots. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SlotDifferenceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SlotDifferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_slot_differences_from_production.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SlotDifferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + + async def _swap_slot_with_production_initial( + self, + resource_group_name: str, + name: str, + slot_swap_entity: "_models.CsmSlotEntity", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._swap_slot_with_production_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + + async def begin_swap_slot_with_production( + self, + resource_group_name: str, + name: str, + slot_swap_entity: "_models.CsmSlotEntity", + **kwargs + ) -> AsyncLROPoller[None]: + """Swaps two deployment slots of an app. + + Description for Swaps two deployment slots of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._swap_slot_with_production_initial( + resource_group_name=resource_group_name, + name=name, + slot_swap_entity=slot_swap_entity, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + + def list_snapshots( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.SnapshotCollection"]: + """Returns all Snapshots to the user. + + Description for Returns all Snapshots to the user. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Website Name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_snapshots.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + + def list_snapshots_from_dr_secondary( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.SnapshotCollection"]: + """Returns all Snapshots to the user from DRSecondary endpoint. + + Description for Returns all Snapshots to the user from DRSecondary endpoint. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Website Name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + + async def get_source_control( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> "_models.SiteSourceControl": + """Gets the source control configuration of an app. + + Description for Gets the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteSourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_source_control.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + + async def _create_or_update_source_control_initial( + self, + resource_group_name: str, + name: str, + site_source_control: "_models.SiteSourceControl", + **kwargs + ) -> "_models.SiteSourceControl": + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_source_control_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + + async def begin_create_or_update_source_control( + self, + resource_group_name: str, + name: str, + site_source_control: "_models.SiteSourceControl", + **kwargs + ) -> AsyncLROPoller["_models.SiteSourceControl"]: + """Updates the source control configuration of an app. + + Description for Updates the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param site_source_control: JSON representation of a SiteSourceControl object. See example. + :type site_source_control: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SiteSourceControl or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_source_control_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + + async def delete_source_control( + self, + resource_group_name: str, + name: str, + additional_flags: Optional[str] = None, + **kwargs + ) -> None: + """Deletes the source control configuration of an app. + + Description for Deletes the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param additional_flags: + :type additional_flags: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_source_control.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if additional_flags is not None: + query_parameters['additionalFlags'] = self._serialize.query("additional_flags", additional_flags, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + + async def update_source_control( + self, + resource_group_name: str, + name: str, + site_source_control: "_models.SiteSourceControl", + **kwargs + ) -> "_models.SiteSourceControl": + """Updates the source control configuration of an app. + + Description for Updates the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param site_source_control: JSON representation of a SiteSourceControl object. See example. + :type site_source_control: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteSourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_source_control.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + + async def start( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Starts an app (or deployment slot, if specified). + + Description for Starts an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + + async def _start_network_trace_initial( + self, + resource_group_name: str, + name: str, + duration_in_seconds: Optional[int] = None, + max_frame_length: Optional[int] = None, + sas_url: Optional[str] = None, + **kwargs + ) -> List["_models.NetworkTrace"]: + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._start_network_trace_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + + async def begin_start_network_trace( + self, + resource_group_name: str, + name: str, + duration_in_seconds: Optional[int] = None, + max_frame_length: Optional[int] = None, + sas_url: Optional[str] = None, + **kwargs + ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: + """Start capturing network packets for the site. + + Description for Start capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either list of NetworkTrace or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_network_trace_initial( + resource_group_name=resource_group_name, + name=name, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + + async def stop( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Stops an app (or deployment slot, if specified). + + Description for Stops an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + + async def stop_network_trace( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Stop ongoing capturing network packets for the site. + + Description for Stop ongoing capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_network_trace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + + async def sync_repository( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Sync web app repository. + + Description for Sync web app repository. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_repository.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + + async def sync_function_triggers( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> None: + """Syncs function trigger metadata to the management database. + + Description for Syncs function trigger metadata to the management database. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_function_triggers.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + + def list_triggered_web_jobs( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: + """List triggered web jobs for an app, or a deployment slot. + + Description for List triggered web jobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TriggeredWebJobCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('TriggeredWebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + + async def get_triggered_web_job( + self, + resource_group_name: str, + name: str, + web_job_name: str, + **kwargs + ) -> Optional["_models.TriggeredWebJob"]: + """Gets a triggered web job by its ID for an app, or a deployment slot. + + Description for Gets a triggered web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TriggeredWebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TriggeredWebJob"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_triggered_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + + async def delete_triggered_web_job( + self, + resource_group_name: str, + name: str, + web_job_name: str, + **kwargs + ) -> None: + """Delete a triggered web job by its ID for an app, or a deployment slot. + + Description for Delete a triggered web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_triggered_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + + def list_triggered_web_job_history( + self, + resource_group_name: str, + name: str, + web_job_name: str, + **kwargs + ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: + """List a triggered web job's history for an app, or a deployment slot. + + Description for List a triggered web job's history for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TriggeredJobHistoryCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('TriggeredJobHistoryCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + + async def get_triggered_web_job_history( + self, + resource_group_name: str, + name: str, + web_job_name: str, + id: str, + **kwargs + ) -> Optional["_models.TriggeredJobHistory"]: + """Gets a triggered web job's history by its ID for an app, , or a deployment slot. + + Description for Gets a triggered web job's history by its ID for an app, , or a deployment + slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param id: History ID. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TriggeredJobHistory, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TriggeredJobHistory"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_triggered_web_job_history.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + + async def run_triggered_web_job( + self, + resource_group_name: str, + name: str, + web_job_name: str, + **kwargs + ) -> None: + """Run a triggered web job for an app, or a deployment slot. + + Description for Run a triggered web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.run_triggered_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + + def list_usages( + self, + resource_group_name: str, + name: str, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: + """Gets the quota usage information of an app (or deployment slot, if specified). + + Description for Gets the quota usage information of an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param filter: Return only information specified in the filter (using OData syntax). For + example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq + 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + duration'[Hour|Minute|Day]'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmUsageQuotaCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CsmUsageQuotaCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + + async def list_vnet_connections( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> List["_models.VnetInfo"]: + """Gets the virtual networks the app (or deployment slot) is connected to. + + Description for Gets the virtual networks the app (or deployment slot) is connected to. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of VnetInfo, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.VnetInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_vnet_connections.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[VnetInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + + async def get_vnet_connection( + self, + resource_group_name: str, + name: str, + vnet_name: str, + **kwargs + ) -> "_models.VnetInfo": + """Gets a virtual network the app (or deployment slot) is connected to by name. + + Description for Gets a virtual network the app (or deployment slot) is connected to by name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the virtual network. + :type vnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + + async def create_or_update_vnet_connection( + self, + resource_group_name: str, + name: str, + vnet_name: str, + connection_envelope: "_models.VnetInfo", + **kwargs + ) -> "_models.VnetInfo": + """Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + + Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the + connection properties (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of an existing Virtual Network. + :type vnet_name: str + :param connection_envelope: Properties of the Virtual Network connection. See example. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_vnet_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + + async def delete_vnet_connection( + self, + resource_group_name: str, + name: str, + vnet_name: str, + **kwargs + ) -> None: + """Deletes a connection from an app (or deployment slot to a named virtual network. + + Description for Deletes a connection from an app (or deployment slot to a named virtual + network. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the virtual network. + :type vnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_vnet_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + + async def update_vnet_connection( + self, + resource_group_name: str, + name: str, + vnet_name: str, + connection_envelope: "_models.VnetInfo", + **kwargs + ) -> "_models.VnetInfo": + """Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + + Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the + connection properties (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of an existing Virtual Network. + :type vnet_name: str + :param connection_envelope: Properties of the Virtual Network connection. See example. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + + async def get_vnet_connection_gateway( + self, + resource_group_name: str, + name: str, + vnet_name: str, + gateway_name: str, + **kwargs + ) -> Optional["_models.VnetGateway"]: + """Gets an app's Virtual Network gateway. + + Description for Gets an app's Virtual Network gateway. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VnetGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_connection_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + async def create_or_update_vnet_connection_gateway( + self, + resource_group_name: str, + name: str, + vnet_name: str, + gateway_name: str, + connection_envelope: "_models.VnetGateway", + **kwargs + ) -> "_models.VnetGateway": + """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :param connection_envelope: The properties to update this gateway with. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_vnet_connection_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + async def update_vnet_connection_gateway( + self, + resource_group_name: str, + name: str, + vnet_name: str, + gateway_name: str, + connection_envelope: "_models.VnetGateway", + **kwargs + ) -> "_models.VnetGateway": + """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :param connection_envelope: The properties to update this gateway with. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_connection_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + def list_web_jobs( + self, + resource_group_name: str, + name: str, + **kwargs + ) -> AsyncIterable["_models.WebJobCollection"]: + """List webjobs for an app, or a deployment slot. + + Description for List webjobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebJobCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_jobs.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + + async def get_web_job( + self, + resource_group_name: str, + name: str, + web_job_name: str, + **kwargs + ) -> "_models.WebJob": + """Get webjob information for an app, or a deployment slot. + + Description for Get webjob information for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of the web job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebJob + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJob"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_site_management_client_operations.py new file mode 100644 index 000000000000..3b95ea8583ca --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_site_management_client_operations.py @@ -0,0 +1,1121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WebSiteManagementClientOperationsMixin: + + async def generate_github_access_token_for_appservice_cli_async( + self, + code: str, + state: str, + **kwargs + ) -> "_models.AppserviceGithubToken": + """Exchange code for GitHub access token for AppService CLI. + + Description for Exchange code for GitHub access token for AppService CLI. + + :param code: Code string to exchange for Github Access token. + :type code: str + :param state: State string used for verification. + :type state: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppserviceGithubToken, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppserviceGithubToken + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppserviceGithubToken"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + _request = _models.AppserviceGithubTokenRequest(code=code, state=state) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.generate_github_access_token_for_appservice_cli_async.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_request, 'AppserviceGithubTokenRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AppserviceGithubToken', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + generate_github_access_token_for_appservice_cli_async.metadata = {'url': '/providers/Microsoft.Web/generateGithubAccessTokenForAppserviceCLI'} # type: ignore + + async def get_publishing_user( + self, + **kwargs + ) -> "_models.User": + """Gets publishing user. + + Description for Gets publishing user. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: User, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.User + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_publishing_user.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + + async def update_publishing_user( + self, + user_details: "_models.User", + **kwargs + ) -> "_models.User": + """Updates publishing user. + + Description for Updates publishing user. + + :param user_details: Details of publishing user. + :type user_details: ~azure.mgmt.web.v2020_12_01.models.User + :keyword callable cls: A custom type or function that will be passed the direct response + :return: User, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.User + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_publishing_user.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(user_details, 'User') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + + def list_source_controls( + self, + **kwargs + ) -> AsyncIterable["_models.SourceControlCollection"]: + """Gets the source controls available for Azure websites. + + Description for Gets the source controls available for Azure websites. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SourceControlCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_source_controls.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SourceControlCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + + async def get_source_control( + self, + source_control_type: str, + **kwargs + ) -> "_models.SourceControl": + """Gets source control token. + + Description for Gets source control token. + + :param source_control_type: Type of source control. + :type source_control_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_source_control.metadata['url'] # type: ignore + path_format_arguments = { + 'sourceControlType': self._serialize.url("source_control_type", source_control_type, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + + async def update_source_control( + self, + source_control_type: str, + request_message: "_models.SourceControl", + **kwargs + ) -> "_models.SourceControl": + """Updates source control token. + + Description for Updates source control token. + + :param source_control_type: Type of source control. + :type source_control_type: str + :param request_message: Source control token information. + :type request_message: ~azure.mgmt.web.v2020_12_01.models.SourceControl + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_source_control.metadata['url'] # type: ignore + path_format_arguments = { + 'sourceControlType': self._serialize.url("source_control_type", source_control_type, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request_message, 'SourceControl') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + + def list_billing_meters( + self, + billing_location: Optional[str] = None, + os_type: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.BillingMeterCollection"]: + """Gets a list of meters for a given location. + + Description for Gets a list of meters for a given location. + + :param billing_location: Azure Location of billable resource. + :type billing_location: str + :param os_type: App Service OS type meters used for. + :type os_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BillingMeterCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_billing_meters.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if billing_location is not None: + query_parameters['billingLocation'] = self._serialize.query("billing_location", billing_location, 'str') + if os_type is not None: + query_parameters['osType'] = self._serialize.query("os_type", os_type, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BillingMeterCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + + async def check_name_availability( + self, + name: str, + type: Union[str, "_models.CheckNameResourceTypes"], + is_fqdn: Optional[bool] = None, + **kwargs + ) -> "_models.ResourceNameAvailability": + """Check if a resource name is available. + + Description for Check if a resource name is available. + + :param name: Resource name to verify. + :type name: str + :param type: Resource type used for verification. + :type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes + :param is_fqdn: Is fully qualified domain name. + :type is_fqdn: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceNameAvailability, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceNameAvailability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_request, 'ResourceNameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceNameAvailability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + + async def get_subscription_deployment_locations( + self, + **kwargs + ) -> "_models.DeploymentLocations": + """Gets list of available geo regions plus ministamps. + + Description for Gets list of available geo regions plus ministamps. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentLocations, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentLocations"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_subscription_deployment_locations.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeploymentLocations', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + + def list_geo_regions( + self, + sku: Optional[Union[str, "_models.SkuName"]] = None, + linux_workers_enabled: Optional[bool] = None, + xenon_workers_enabled: Optional[bool] = None, + linux_dynamic_workers_enabled: Optional[bool] = None, + **kwargs + ) -> AsyncIterable["_models.GeoRegionCollection"]: + """Get a list of available geographical regions. + + Description for Get a list of available geographical regions. + + :param sku: Name of SKU used to filter the regions. + :type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName + :param linux_workers_enabled: Specify :code:`true` if you want to filter to only + regions that support Linux workers. + :type linux_workers_enabled: bool + :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only + regions that support Xenon workers. + :type xenon_workers_enabled: bool + :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter + to only regions that support Linux Consumption Workers. + :type linux_dynamic_workers_enabled: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_geo_regions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if sku is not None: + query_parameters['sku'] = self._serialize.query("sku", sku, 'str') + if linux_workers_enabled is not None: + query_parameters['linuxWorkersEnabled'] = self._serialize.query("linux_workers_enabled", linux_workers_enabled, 'bool') + if xenon_workers_enabled is not None: + query_parameters['xenonWorkersEnabled'] = self._serialize.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + if linux_dynamic_workers_enabled is not None: + query_parameters['linuxDynamicWorkersEnabled'] = self._serialize.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('GeoRegionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + + def list_site_identifiers_assigned_to_host_name( + self, + name_identifier: "_models.NameIdentifier", + **kwargs + ) -> AsyncIterable["_models.IdentifierCollection"]: + """List all apps that are assigned to a hostname. + + Description for List all apps that are assigned to a hostname. + + :param name_identifier: Hostname information. + :type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IdentifierCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IdentifierCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + + def list_premier_add_on_offers( + self, + **kwargs + ) -> AsyncIterable["_models.PremierAddOnOfferCollection"]: + """List all premier add-on offers. + + Description for List all premier add-on offers. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_premier_add_on_offers.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PremierAddOnOfferCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + + async def list_skus( + self, + **kwargs + ) -> "_models.SkuInfos": + """List all SKUs. + + Description for List all SKUs. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SkuInfos, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfos"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SkuInfos', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + + async def verify_hosting_environment_vnet( + self, + parameters: "_models.VnetParameters", + **kwargs + ) -> "_models.VnetValidationFailureDetails": + """Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + + Description for Verifies if this VNET is compatible with an App Service Environment by + analyzing the Network Security Group rules. + + :param parameters: VNET information. + :type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetValidationFailureDetails, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetValidationFailureDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.verify_hosting_environment_vnet.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VnetParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetValidationFailureDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + + async def move( + self, + resource_group_name: str, + move_resource_envelope: "_models.CsmMoveResourceEnvelope", + **kwargs + ) -> None: + """Move resources between resource groups. + + Description for Move resources between resource groups. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param move_resource_envelope: Object that represents the resource to move. + :type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.move.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + + async def validate( + self, + resource_group_name: str, + validate_request: "_models.ValidateRequest", + **kwargs + ) -> "_models.ValidateResponse": + """Validate if a resource can be created. + + Description for Validate if a resource can be created. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param validate_request: Request with the resources to validate. + :type validate_request: ~azure.mgmt.web.v2020_12_01.models.ValidateRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidateResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_request, 'ValidateRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidateResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + + async def validate_move( + self, + resource_group_name: str, + move_resource_envelope: "_models.CsmMoveResourceEnvelope", + **kwargs + ) -> None: + """Validate whether a resource can be moved. + + Description for Validate whether a resource can be moved. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param move_resource_envelope: Object that represents the resource to move. + :type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_move.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/__init__.py new file mode 100644 index 000000000000..fbbd4b0d9597 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/__init__.py @@ -0,0 +1,1350 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AbnormalTimePeriod + from ._models_py3 import Address + from ._models_py3 import AddressResponse + from ._models_py3 import AllowedAudiencesValidation + from ._models_py3 import AnalysisData + from ._models_py3 import AnalysisDefinition + from ._models_py3 import ApiDefinitionInfo + from ._models_py3 import ApiKVReference + from ._models_py3 import ApiKVReferenceCollection + from ._models_py3 import ApiManagementConfig + from ._models_py3 import AppInsightsWebAppStackSettings + from ._models_py3 import AppRegistration + from ._models_py3 import AppServiceCertificate + from ._models_py3 import AppServiceCertificateCollection + from ._models_py3 import AppServiceCertificateOrder + from ._models_py3 import AppServiceCertificateOrderCollection + from ._models_py3 import AppServiceCertificateOrderPatchResource + from ._models_py3 import AppServiceCertificatePatchResource + from ._models_py3 import AppServiceCertificateResource + from ._models_py3 import AppServiceEnvironment + from ._models_py3 import AppServiceEnvironmentCollection + from ._models_py3 import AppServiceEnvironmentPatchResource + from ._models_py3 import AppServiceEnvironmentResource + from ._models_py3 import AppServicePlan + from ._models_py3 import AppServicePlanCollection + from ._models_py3 import AppServicePlanPatchResource + from ._models_py3 import Apple + from ._models_py3 import AppleRegistration + from ._models_py3 import ApplicationLogsConfig + from ._models_py3 import ApplicationStack + from ._models_py3 import ApplicationStackCollection + from ._models_py3 import ApplicationStackResource + from ._models_py3 import AppserviceGithubToken + from ._models_py3 import AppserviceGithubTokenRequest + from ._models_py3 import ArmIdWrapper + from ._models_py3 import AseV3NetworkingConfiguration + from ._models_py3 import AuthPlatform + from ._models_py3 import AutoHealActions + from ._models_py3 import AutoHealCustomAction + from ._models_py3 import AutoHealRules + from ._models_py3 import AutoHealTriggers + from ._models_py3 import AzureActiveDirectory + from ._models_py3 import AzureActiveDirectoryLogin + from ._models_py3 import AzureActiveDirectoryRegistration + from ._models_py3 import AzureActiveDirectoryValidation + from ._models_py3 import AzureBlobStorageApplicationLogsConfig + from ._models_py3 import AzureBlobStorageHttpLogsConfig + from ._models_py3 import AzureStaticWebApps + from ._models_py3 import AzureStaticWebAppsRegistration + from ._models_py3 import AzureStorageInfoValue + from ._models_py3 import AzureStoragePropertyDictionaryResource + from ._models_py3 import AzureTableStorageApplicationLogsConfig + from ._models_py3 import BackupItem + from ._models_py3 import BackupItemCollection + from ._models_py3 import BackupRequest + from ._models_py3 import BackupSchedule + from ._models_py3 import BillingMeter + from ._models_py3 import BillingMeterCollection + from ._models_py3 import BlobStorageTokenStore + from ._models_py3 import Capability + from ._models_py3 import Certificate + from ._models_py3 import CertificateCollection + from ._models_py3 import CertificateDetails + from ._models_py3 import CertificateEmail + from ._models_py3 import CertificateOrderAction + from ._models_py3 import CertificateOrderContact + from ._models_py3 import CertificatePatchResource + from ._models_py3 import ClientRegistration + from ._models_py3 import CloningInfo + from ._models_py3 import Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties + from ._models_py3 import ConnStringInfo + from ._models_py3 import ConnStringValueTypePair + from ._models_py3 import ConnectionStringDictionary + from ._models_py3 import Contact + from ._models_py3 import ContainerCpuStatistics + from ._models_py3 import ContainerCpuUsage + from ._models_py3 import ContainerInfo + from ._models_py3 import ContainerMemoryStatistics + from ._models_py3 import ContainerNetworkInterfaceStatistics + from ._models_py3 import ContainerThrottlingData + from ._models_py3 import ContinuousWebJob + from ._models_py3 import ContinuousWebJobCollection + from ._models_py3 import CookieExpiration + from ._models_py3 import CorsSettings + from ._models_py3 import CsmMoveResourceEnvelope + from ._models_py3 import CsmOperationCollection + from ._models_py3 import CsmOperationDescription + from ._models_py3 import CsmOperationDescriptionProperties + from ._models_py3 import CsmOperationDisplay + from ._models_py3 import CsmPublishingCredentialsPoliciesCollection + from ._models_py3 import CsmPublishingCredentialsPoliciesEntity + from ._models_py3 import CsmPublishingProfileOptions + from ._models_py3 import CsmSlotEntity + from ._models_py3 import CsmUsageQuota + from ._models_py3 import CsmUsageQuotaCollection + from ._models_py3 import CustomHostnameAnalysisResult + from ._models_py3 import CustomOpenIdConnectProvider + from ._models_py3 import DataProviderMetadata + from ._models_py3 import DataSource + from ._models_py3 import DataTableResponseColumn + from ._models_py3 import DataTableResponseObject + from ._models_py3 import DatabaseBackupSetting + from ._models_py3 import DefaultErrorResponse + from ._models_py3 import DefaultErrorResponseError + from ._models_py3 import DefaultErrorResponseErrorDetailsItem + from ._models_py3 import DeletedAppRestoreRequest + from ._models_py3 import DeletedSite + from ._models_py3 import DeletedWebAppCollection + from ._models_py3 import Deployment + from ._models_py3 import DeploymentCollection + from ._models_py3 import DeploymentLocations + from ._models_py3 import DetectorAbnormalTimePeriod + from ._models_py3 import DetectorDefinition + from ._models_py3 import DetectorInfo + from ._models_py3 import DetectorResponse + from ._models_py3 import DetectorResponseCollection + from ._models_py3 import DiagnosticAnalysis + from ._models_py3 import DiagnosticAnalysisCollection + from ._models_py3 import DiagnosticCategory + from ._models_py3 import DiagnosticCategoryCollection + from ._models_py3 import DiagnosticData + from ._models_py3 import DiagnosticDetectorCollection + from ._models_py3 import DiagnosticDetectorResponse + from ._models_py3 import DiagnosticMetricSample + from ._models_py3 import DiagnosticMetricSet + from ._models_py3 import Dimension + from ._models_py3 import Domain + from ._models_py3 import DomainAvailabilityCheckResult + from ._models_py3 import DomainCollection + from ._models_py3 import DomainControlCenterSsoRequest + from ._models_py3 import DomainOwnershipIdentifier + from ._models_py3 import DomainOwnershipIdentifierCollection + from ._models_py3 import DomainPatchResource + from ._models_py3 import DomainPurchaseConsent + from ._models_py3 import DomainRecommendationSearchParameters + from ._models_py3 import EnabledConfig + from ._models_py3 import EndpointDependency + from ._models_py3 import EndpointDetail + from ._models_py3 import ErrorEntity + from ._models_py3 import Experiments + from ._models_py3 import Facebook + from ._models_py3 import FileSystemApplicationLogsConfig + from ._models_py3 import FileSystemHttpLogsConfig + from ._models_py3 import FileSystemTokenStore + from ._models_py3 import ForwardProxy + from ._models_py3 import FunctionAppMajorVersion + from ._models_py3 import FunctionAppMinorVersion + from ._models_py3 import FunctionAppRuntimeSettings + from ._models_py3 import FunctionAppRuntimes + from ._models_py3 import FunctionAppStack + from ._models_py3 import FunctionAppStackCollection + from ._models_py3 import FunctionEnvelope + from ._models_py3 import FunctionEnvelopeCollection + from ._models_py3 import FunctionSecrets + from ._models_py3 import GeoRegion + from ._models_py3 import GeoRegionCollection + from ._models_py3 import GitHub + from ._models_py3 import GitHubActionCodeConfiguration + from ._models_py3 import GitHubActionConfiguration + from ._models_py3 import GitHubActionContainerConfiguration + from ._models_py3 import GitHubActionWebAppStackSettings + from ._models_py3 import GlobalCsmSkuDescription + from ._models_py3 import GlobalValidation + from ._models_py3 import Google + from ._models_py3 import HandlerMapping + from ._models_py3 import HostKeys + from ._models_py3 import HostName + from ._models_py3 import HostNameBinding + from ._models_py3 import HostNameBindingCollection + from ._models_py3 import HostNameSslState + from ._models_py3 import HostingEnvironmentDeploymentInfo + from ._models_py3 import HostingEnvironmentDiagnostics + from ._models_py3 import HostingEnvironmentProfile + from ._models_py3 import HttpLogsConfig + from ._models_py3 import HttpSettings + from ._models_py3 import HttpSettingsRoutes + from ._models_py3 import HybridConnection + from ._models_py3 import HybridConnectionCollection + from ._models_py3 import HybridConnectionKey + from ._models_py3 import HybridConnectionLimits + from ._models_py3 import Identifier + from ._models_py3 import IdentifierCollection + from ._models_py3 import IdentityProviders + from ._models_py3 import InboundEnvironmentEndpoint + from ._models_py3 import InboundEnvironmentEndpointCollection + from ._models_py3 import IpSecurityRestriction + from ._models_py3 import JwtClaimChecks + from ._models_py3 import KeyInfo + from ._models_py3 import KeyValuePairStringObject + from ._models_py3 import KubeEnvironmentProfile + from ._models_py3 import LegacyMicrosoftAccount + from ._models_py3 import LinuxJavaContainerSettings + from ._models_py3 import LocalizableString + from ._models_py3 import LogSpecification + from ._models_py3 import Login + from ._models_py3 import LoginRoutes + from ._models_py3 import LoginScopes + from ._models_py3 import MSDeploy + from ._models_py3 import MSDeployLog + from ._models_py3 import MSDeployLogEntry + from ._models_py3 import MSDeployStatus + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricSpecification + from ._models_py3 import MigrateMySqlRequest + from ._models_py3 import MigrateMySqlStatus + from ._models_py3 import NameIdentifier + from ._models_py3 import NameIdentifierCollection + from ._models_py3 import NameValuePair + from ._models_py3 import NetworkFeatures + from ._models_py3 import NetworkTrace + from ._models_py3 import Nonce + from ._models_py3 import OpenIdConnectClientCredential + from ._models_py3 import OpenIdConnectConfig + from ._models_py3 import OpenIdConnectLogin + from ._models_py3 import OpenIdConnectRegistration + from ._models_py3 import Operation + from ._models_py3 import OutboundEnvironmentEndpoint + from ._models_py3 import OutboundEnvironmentEndpointCollection + from ._models_py3 import PerfMonCounterCollection + from ._models_py3 import PerfMonResponse + from ._models_py3 import PerfMonSample + from ._models_py3 import PerfMonSet + from ._models_py3 import PremierAddOn + from ._models_py3 import PremierAddOnOffer + from ._models_py3 import PremierAddOnOfferCollection + from ._models_py3 import PremierAddOnPatchResource + from ._models_py3 import PrivateAccess + from ._models_py3 import PrivateAccessSubnet + from ._models_py3 import PrivateAccessVirtualNetwork + from ._models_py3 import PrivateEndpointConnectionCollection + from ._models_py3 import PrivateLinkConnectionApprovalRequestResource + from ._models_py3 import PrivateLinkConnectionState + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceProperties + from ._models_py3 import PrivateLinkResourcesWrapper + from ._models_py3 import ProcessInfo + from ._models_py3 import ProcessInfoCollection + from ._models_py3 import ProcessModuleInfo + from ._models_py3 import ProcessModuleInfoCollection + from ._models_py3 import ProcessThreadInfo + from ._models_py3 import ProcessThreadInfoCollection + from ._models_py3 import ProxyOnlyResource + from ._models_py3 import PublicCertificate + from ._models_py3 import PublicCertificateCollection + from ._models_py3 import PushSettings + from ._models_py3 import QueryUtterancesResult + from ._models_py3 import QueryUtterancesResults + from ._models_py3 import RampUpRule + from ._models_py3 import Recommendation + from ._models_py3 import RecommendationCollection + from ._models_py3 import RecommendationRule + from ._models_py3 import ReissueCertificateOrderRequest + from ._models_py3 import RelayServiceConnectionEntity + from ._models_py3 import RemotePrivateEndpointConnectionARMResource + from ._models_py3 import Rendering + from ._models_py3 import RenewCertificateOrderRequest + from ._models_py3 import RequestsBasedTrigger + from ._models_py3 import Resource + from ._models_py3 import ResourceCollection + from ._models_py3 import ResourceHealthMetadata + from ._models_py3 import ResourceHealthMetadataCollection + from ._models_py3 import ResourceMetricAvailability + from ._models_py3 import ResourceMetricDefinition + from ._models_py3 import ResourceMetricDefinitionCollection + from ._models_py3 import ResourceNameAvailability + from ._models_py3 import ResourceNameAvailabilityRequest + from ._models_py3 import ResponseMetaData + from ._models_py3 import RestoreRequest + from ._models_py3 import SampleUtterance + from ._models_py3 import ServiceSpecification + from ._models_py3 import Site + from ._models_py3 import SiteAuthSettings + from ._models_py3 import SiteAuthSettingsV2 + from ._models_py3 import SiteCloneability + from ._models_py3 import SiteCloneabilityCriterion + from ._models_py3 import SiteConfig + from ._models_py3 import SiteConfigPropertiesDictionary + from ._models_py3 import SiteConfigResource + from ._models_py3 import SiteConfigResourceCollection + from ._models_py3 import SiteConfigurationSnapshotInfo + from ._models_py3 import SiteConfigurationSnapshotInfoCollection + from ._models_py3 import SiteExtensionInfo + from ._models_py3 import SiteExtensionInfoCollection + from ._models_py3 import SiteLimits + from ._models_py3 import SiteLogsConfig + from ._models_py3 import SiteMachineKey + from ._models_py3 import SitePatchResource + from ._models_py3 import SitePhpErrorLogFlag + from ._models_py3 import SiteSeal + from ._models_py3 import SiteSealRequest + from ._models_py3 import SiteSourceControl + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuDescription + from ._models_py3 import SkuInfo + from ._models_py3 import SkuInfoCollection + from ._models_py3 import SkuInfos + from ._models_py3 import SlotConfigNamesResource + from ._models_py3 import SlotDifference + from ._models_py3 import SlotDifferenceCollection + from ._models_py3 import SlotSwapStatus + from ._models_py3 import SlowRequestsBasedTrigger + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotCollection + from ._models_py3 import SnapshotRecoverySource + from ._models_py3 import SnapshotRestoreRequest + from ._models_py3 import Solution + from ._models_py3 import SourceControl + from ._models_py3 import SourceControlCollection + from ._models_py3 import StackMajorVersion + from ._models_py3 import StackMinorVersion + from ._models_py3 import StampCapacity + from ._models_py3 import StampCapacityCollection + from ._models_py3 import StaticSiteARMResource + from ._models_py3 import StaticSiteBuildARMResource + from ._models_py3 import StaticSiteBuildCollection + from ._models_py3 import StaticSiteBuildProperties + from ._models_py3 import StaticSiteCollection + from ._models_py3 import StaticSiteCustomDomainOverviewARMResource + from ._models_py3 import StaticSiteCustomDomainOverviewCollection + from ._models_py3 import StaticSiteCustomDomainRequestPropertiesARMResource + from ._models_py3 import StaticSiteFunctionOverviewARMResource + from ._models_py3 import StaticSiteFunctionOverviewCollection + from ._models_py3 import StaticSitePatchResource + from ._models_py3 import StaticSiteResetPropertiesARMResource + from ._models_py3 import StaticSiteTemplateOptions + from ._models_py3 import StaticSiteUserARMResource + from ._models_py3 import StaticSiteUserCollection + from ._models_py3 import StaticSiteUserInvitationRequestResource + from ._models_py3 import StaticSiteUserInvitationResponseResource + from ._models_py3 import StaticSiteUserProvidedFunctionApp + from ._models_py3 import StaticSiteUserProvidedFunctionAppARMResource + from ._models_py3 import StaticSiteUserProvidedFunctionAppsCollection + from ._models_py3 import StaticSiteZipDeploymentARMResource + from ._models_py3 import StaticSitesWorkflowPreview + from ._models_py3 import StaticSitesWorkflowPreviewRequest + from ._models_py3 import Status + from ._models_py3 import StatusCodesBasedTrigger + from ._models_py3 import StatusCodesRangeBasedTrigger + from ._models_py3 import StorageMigrationOptions + from ._models_py3 import StorageMigrationResponse + from ._models_py3 import StringDictionary + from ._models_py3 import StringList + from ._models_py3 import SupportTopic + from ._models_py3 import SwiftVirtualNetwork + from ._models_py3 import TldLegalAgreement + from ._models_py3 import TldLegalAgreementCollection + from ._models_py3 import TokenStore + from ._models_py3 import TopLevelDomain + from ._models_py3 import TopLevelDomainAgreementOption + from ._models_py3 import TopLevelDomainCollection + from ._models_py3 import TriggeredJobHistory + from ._models_py3 import TriggeredJobHistoryCollection + from ._models_py3 import TriggeredJobRun + from ._models_py3 import TriggeredWebJob + from ._models_py3 import TriggeredWebJobCollection + from ._models_py3 import Twitter + from ._models_py3 import TwitterRegistration + from ._models_py3 import Usage + from ._models_py3 import UsageCollection + from ._models_py3 import User + from ._models_py3 import ValidateRequest + from ._models_py3 import ValidateResponse + from ._models_py3 import ValidateResponseError + from ._models_py3 import VirtualApplication + from ._models_py3 import VirtualDirectory + from ._models_py3 import VirtualIPMapping + from ._models_py3 import VirtualNetworkProfile + from ._models_py3 import VnetGateway + from ._models_py3 import VnetInfo + from ._models_py3 import VnetParameters + from ._models_py3 import VnetRoute + from ._models_py3 import VnetValidationFailureDetails + from ._models_py3 import VnetValidationTestFailure + from ._models_py3 import WebAppCollection + from ._models_py3 import WebAppInstanceStatusCollection + from ._models_py3 import WebAppMajorVersion + from ._models_py3 import WebAppMinorVersion + from ._models_py3 import WebAppRuntimeSettings + from ._models_py3 import WebAppRuntimes + from ._models_py3 import WebAppStack + from ._models_py3 import WebAppStackCollection + from ._models_py3 import WebJob + from ._models_py3 import WebJobCollection + from ._models_py3 import WebSiteInstanceStatus + from ._models_py3 import WindowsJavaContainerSettings + from ._models_py3 import WorkerPoolCollection + from ._models_py3 import WorkerPoolResource +except (SyntaxError, ImportError): + from ._models import AbnormalTimePeriod # type: ignore + from ._models import Address # type: ignore + from ._models import AddressResponse # type: ignore + from ._models import AllowedAudiencesValidation # type: ignore + from ._models import AnalysisData # type: ignore + from ._models import AnalysisDefinition # type: ignore + from ._models import ApiDefinitionInfo # type: ignore + from ._models import ApiKVReference # type: ignore + from ._models import ApiKVReferenceCollection # type: ignore + from ._models import ApiManagementConfig # type: ignore + from ._models import AppInsightsWebAppStackSettings # type: ignore + from ._models import AppRegistration # type: ignore + from ._models import AppServiceCertificate # type: ignore + from ._models import AppServiceCertificateCollection # type: ignore + from ._models import AppServiceCertificateOrder # type: ignore + from ._models import AppServiceCertificateOrderCollection # type: ignore + from ._models import AppServiceCertificateOrderPatchResource # type: ignore + from ._models import AppServiceCertificatePatchResource # type: ignore + from ._models import AppServiceCertificateResource # type: ignore + from ._models import AppServiceEnvironment # type: ignore + from ._models import AppServiceEnvironmentCollection # type: ignore + from ._models import AppServiceEnvironmentPatchResource # type: ignore + from ._models import AppServiceEnvironmentResource # type: ignore + from ._models import AppServicePlan # type: ignore + from ._models import AppServicePlanCollection # type: ignore + from ._models import AppServicePlanPatchResource # type: ignore + from ._models import Apple # type: ignore + from ._models import AppleRegistration # type: ignore + from ._models import ApplicationLogsConfig # type: ignore + from ._models import ApplicationStack # type: ignore + from ._models import ApplicationStackCollection # type: ignore + from ._models import ApplicationStackResource # type: ignore + from ._models import AppserviceGithubToken # type: ignore + from ._models import AppserviceGithubTokenRequest # type: ignore + from ._models import ArmIdWrapper # type: ignore + from ._models import AseV3NetworkingConfiguration # type: ignore + from ._models import AuthPlatform # type: ignore + from ._models import AutoHealActions # type: ignore + from ._models import AutoHealCustomAction # type: ignore + from ._models import AutoHealRules # type: ignore + from ._models import AutoHealTriggers # type: ignore + from ._models import AzureActiveDirectory # type: ignore + from ._models import AzureActiveDirectoryLogin # type: ignore + from ._models import AzureActiveDirectoryRegistration # type: ignore + from ._models import AzureActiveDirectoryValidation # type: ignore + from ._models import AzureBlobStorageApplicationLogsConfig # type: ignore + from ._models import AzureBlobStorageHttpLogsConfig # type: ignore + from ._models import AzureStaticWebApps # type: ignore + from ._models import AzureStaticWebAppsRegistration # type: ignore + from ._models import AzureStorageInfoValue # type: ignore + from ._models import AzureStoragePropertyDictionaryResource # type: ignore + from ._models import AzureTableStorageApplicationLogsConfig # type: ignore + from ._models import BackupItem # type: ignore + from ._models import BackupItemCollection # type: ignore + from ._models import BackupRequest # type: ignore + from ._models import BackupSchedule # type: ignore + from ._models import BillingMeter # type: ignore + from ._models import BillingMeterCollection # type: ignore + from ._models import BlobStorageTokenStore # type: ignore + from ._models import Capability # type: ignore + from ._models import Certificate # type: ignore + from ._models import CertificateCollection # type: ignore + from ._models import CertificateDetails # type: ignore + from ._models import CertificateEmail # type: ignore + from ._models import CertificateOrderAction # type: ignore + from ._models import CertificateOrderContact # type: ignore + from ._models import CertificatePatchResource # type: ignore + from ._models import ClientRegistration # type: ignore + from ._models import CloningInfo # type: ignore + from ._models import Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore + from ._models import ConnStringInfo # type: ignore + from ._models import ConnStringValueTypePair # type: ignore + from ._models import ConnectionStringDictionary # type: ignore + from ._models import Contact # type: ignore + from ._models import ContainerCpuStatistics # type: ignore + from ._models import ContainerCpuUsage # type: ignore + from ._models import ContainerInfo # type: ignore + from ._models import ContainerMemoryStatistics # type: ignore + from ._models import ContainerNetworkInterfaceStatistics # type: ignore + from ._models import ContainerThrottlingData # type: ignore + from ._models import ContinuousWebJob # type: ignore + from ._models import ContinuousWebJobCollection # type: ignore + from ._models import CookieExpiration # type: ignore + from ._models import CorsSettings # type: ignore + from ._models import CsmMoveResourceEnvelope # type: ignore + from ._models import CsmOperationCollection # type: ignore + from ._models import CsmOperationDescription # type: ignore + from ._models import CsmOperationDescriptionProperties # type: ignore + from ._models import CsmOperationDisplay # type: ignore + from ._models import CsmPublishingCredentialsPoliciesCollection # type: ignore + from ._models import CsmPublishingCredentialsPoliciesEntity # type: ignore + from ._models import CsmPublishingProfileOptions # type: ignore + from ._models import CsmSlotEntity # type: ignore + from ._models import CsmUsageQuota # type: ignore + from ._models import CsmUsageQuotaCollection # type: ignore + from ._models import CustomHostnameAnalysisResult # type: ignore + from ._models import CustomOpenIdConnectProvider # type: ignore + from ._models import DataProviderMetadata # type: ignore + from ._models import DataSource # type: ignore + from ._models import DataTableResponseColumn # type: ignore + from ._models import DataTableResponseObject # type: ignore + from ._models import DatabaseBackupSetting # type: ignore + from ._models import DefaultErrorResponse # type: ignore + from ._models import DefaultErrorResponseError # type: ignore + from ._models import DefaultErrorResponseErrorDetailsItem # type: ignore + from ._models import DeletedAppRestoreRequest # type: ignore + from ._models import DeletedSite # type: ignore + from ._models import DeletedWebAppCollection # type: ignore + from ._models import Deployment # type: ignore + from ._models import DeploymentCollection # type: ignore + from ._models import DeploymentLocations # type: ignore + from ._models import DetectorAbnormalTimePeriod # type: ignore + from ._models import DetectorDefinition # type: ignore + from ._models import DetectorInfo # type: ignore + from ._models import DetectorResponse # type: ignore + from ._models import DetectorResponseCollection # type: ignore + from ._models import DiagnosticAnalysis # type: ignore + from ._models import DiagnosticAnalysisCollection # type: ignore + from ._models import DiagnosticCategory # type: ignore + from ._models import DiagnosticCategoryCollection # type: ignore + from ._models import DiagnosticData # type: ignore + from ._models import DiagnosticDetectorCollection # type: ignore + from ._models import DiagnosticDetectorResponse # type: ignore + from ._models import DiagnosticMetricSample # type: ignore + from ._models import DiagnosticMetricSet # type: ignore + from ._models import Dimension # type: ignore + from ._models import Domain # type: ignore + from ._models import DomainAvailabilityCheckResult # type: ignore + from ._models import DomainCollection # type: ignore + from ._models import DomainControlCenterSsoRequest # type: ignore + from ._models import DomainOwnershipIdentifier # type: ignore + from ._models import DomainOwnershipIdentifierCollection # type: ignore + from ._models import DomainPatchResource # type: ignore + from ._models import DomainPurchaseConsent # type: ignore + from ._models import DomainRecommendationSearchParameters # type: ignore + from ._models import EnabledConfig # type: ignore + from ._models import EndpointDependency # type: ignore + from ._models import EndpointDetail # type: ignore + from ._models import ErrorEntity # type: ignore + from ._models import Experiments # type: ignore + from ._models import Facebook # type: ignore + from ._models import FileSystemApplicationLogsConfig # type: ignore + from ._models import FileSystemHttpLogsConfig # type: ignore + from ._models import FileSystemTokenStore # type: ignore + from ._models import ForwardProxy # type: ignore + from ._models import FunctionAppMajorVersion # type: ignore + from ._models import FunctionAppMinorVersion # type: ignore + from ._models import FunctionAppRuntimeSettings # type: ignore + from ._models import FunctionAppRuntimes # type: ignore + from ._models import FunctionAppStack # type: ignore + from ._models import FunctionAppStackCollection # type: ignore + from ._models import FunctionEnvelope # type: ignore + from ._models import FunctionEnvelopeCollection # type: ignore + from ._models import FunctionSecrets # type: ignore + from ._models import GeoRegion # type: ignore + from ._models import GeoRegionCollection # type: ignore + from ._models import GitHub # type: ignore + from ._models import GitHubActionCodeConfiguration # type: ignore + from ._models import GitHubActionConfiguration # type: ignore + from ._models import GitHubActionContainerConfiguration # type: ignore + from ._models import GitHubActionWebAppStackSettings # type: ignore + from ._models import GlobalCsmSkuDescription # type: ignore + from ._models import GlobalValidation # type: ignore + from ._models import Google # type: ignore + from ._models import HandlerMapping # type: ignore + from ._models import HostKeys # type: ignore + from ._models import HostName # type: ignore + from ._models import HostNameBinding # type: ignore + from ._models import HostNameBindingCollection # type: ignore + from ._models import HostNameSslState # type: ignore + from ._models import HostingEnvironmentDeploymentInfo # type: ignore + from ._models import HostingEnvironmentDiagnostics # type: ignore + from ._models import HostingEnvironmentProfile # type: ignore + from ._models import HttpLogsConfig # type: ignore + from ._models import HttpSettings # type: ignore + from ._models import HttpSettingsRoutes # type: ignore + from ._models import HybridConnection # type: ignore + from ._models import HybridConnectionCollection # type: ignore + from ._models import HybridConnectionKey # type: ignore + from ._models import HybridConnectionLimits # type: ignore + from ._models import Identifier # type: ignore + from ._models import IdentifierCollection # type: ignore + from ._models import IdentityProviders # type: ignore + from ._models import InboundEnvironmentEndpoint # type: ignore + from ._models import InboundEnvironmentEndpointCollection # type: ignore + from ._models import IpSecurityRestriction # type: ignore + from ._models import JwtClaimChecks # type: ignore + from ._models import KeyInfo # type: ignore + from ._models import KeyValuePairStringObject # type: ignore + from ._models import KubeEnvironmentProfile # type: ignore + from ._models import LegacyMicrosoftAccount # type: ignore + from ._models import LinuxJavaContainerSettings # type: ignore + from ._models import LocalizableString # type: ignore + from ._models import LogSpecification # type: ignore + from ._models import Login # type: ignore + from ._models import LoginRoutes # type: ignore + from ._models import LoginScopes # type: ignore + from ._models import MSDeploy # type: ignore + from ._models import MSDeployLog # type: ignore + from ._models import MSDeployLogEntry # type: ignore + from ._models import MSDeployStatus # type: ignore + from ._models import ManagedServiceIdentity # type: ignore + from ._models import MetricAvailability # type: ignore + from ._models import MetricSpecification # type: ignore + from ._models import MigrateMySqlRequest # type: ignore + from ._models import MigrateMySqlStatus # type: ignore + from ._models import NameIdentifier # type: ignore + from ._models import NameIdentifierCollection # type: ignore + from ._models import NameValuePair # type: ignore + from ._models import NetworkFeatures # type: ignore + from ._models import NetworkTrace # type: ignore + from ._models import Nonce # type: ignore + from ._models import OpenIdConnectClientCredential # type: ignore + from ._models import OpenIdConnectConfig # type: ignore + from ._models import OpenIdConnectLogin # type: ignore + from ._models import OpenIdConnectRegistration # type: ignore + from ._models import Operation # type: ignore + from ._models import OutboundEnvironmentEndpoint # type: ignore + from ._models import OutboundEnvironmentEndpointCollection # type: ignore + from ._models import PerfMonCounterCollection # type: ignore + from ._models import PerfMonResponse # type: ignore + from ._models import PerfMonSample # type: ignore + from ._models import PerfMonSet # type: ignore + from ._models import PremierAddOn # type: ignore + from ._models import PremierAddOnOffer # type: ignore + from ._models import PremierAddOnOfferCollection # type: ignore + from ._models import PremierAddOnPatchResource # type: ignore + from ._models import PrivateAccess # type: ignore + from ._models import PrivateAccessSubnet # type: ignore + from ._models import PrivateAccessVirtualNetwork # type: ignore + from ._models import PrivateEndpointConnectionCollection # type: ignore + from ._models import PrivateLinkConnectionApprovalRequestResource # type: ignore + from ._models import PrivateLinkConnectionState # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceProperties # type: ignore + from ._models import PrivateLinkResourcesWrapper # type: ignore + from ._models import ProcessInfo # type: ignore + from ._models import ProcessInfoCollection # type: ignore + from ._models import ProcessModuleInfo # type: ignore + from ._models import ProcessModuleInfoCollection # type: ignore + from ._models import ProcessThreadInfo # type: ignore + from ._models import ProcessThreadInfoCollection # type: ignore + from ._models import ProxyOnlyResource # type: ignore + from ._models import PublicCertificate # type: ignore + from ._models import PublicCertificateCollection # type: ignore + from ._models import PushSettings # type: ignore + from ._models import QueryUtterancesResult # type: ignore + from ._models import QueryUtterancesResults # type: ignore + from ._models import RampUpRule # type: ignore + from ._models import Recommendation # type: ignore + from ._models import RecommendationCollection # type: ignore + from ._models import RecommendationRule # type: ignore + from ._models import ReissueCertificateOrderRequest # type: ignore + from ._models import RelayServiceConnectionEntity # type: ignore + from ._models import RemotePrivateEndpointConnectionARMResource # type: ignore + from ._models import Rendering # type: ignore + from ._models import RenewCertificateOrderRequest # type: ignore + from ._models import RequestsBasedTrigger # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceCollection # type: ignore + from ._models import ResourceHealthMetadata # type: ignore + from ._models import ResourceHealthMetadataCollection # type: ignore + from ._models import ResourceMetricAvailability # type: ignore + from ._models import ResourceMetricDefinition # type: ignore + from ._models import ResourceMetricDefinitionCollection # type: ignore + from ._models import ResourceNameAvailability # type: ignore + from ._models import ResourceNameAvailabilityRequest # type: ignore + from ._models import ResponseMetaData # type: ignore + from ._models import RestoreRequest # type: ignore + from ._models import SampleUtterance # type: ignore + from ._models import ServiceSpecification # type: ignore + from ._models import Site # type: ignore + from ._models import SiteAuthSettings # type: ignore + from ._models import SiteAuthSettingsV2 # type: ignore + from ._models import SiteCloneability # type: ignore + from ._models import SiteCloneabilityCriterion # type: ignore + from ._models import SiteConfig # type: ignore + from ._models import SiteConfigPropertiesDictionary # type: ignore + from ._models import SiteConfigResource # type: ignore + from ._models import SiteConfigResourceCollection # type: ignore + from ._models import SiteConfigurationSnapshotInfo # type: ignore + from ._models import SiteConfigurationSnapshotInfoCollection # type: ignore + from ._models import SiteExtensionInfo # type: ignore + from ._models import SiteExtensionInfoCollection # type: ignore + from ._models import SiteLimits # type: ignore + from ._models import SiteLogsConfig # type: ignore + from ._models import SiteMachineKey # type: ignore + from ._models import SitePatchResource # type: ignore + from ._models import SitePhpErrorLogFlag # type: ignore + from ._models import SiteSeal # type: ignore + from ._models import SiteSealRequest # type: ignore + from ._models import SiteSourceControl # type: ignore + from ._models import SkuCapacity # type: ignore + from ._models import SkuDescription # type: ignore + from ._models import SkuInfo # type: ignore + from ._models import SkuInfoCollection # type: ignore + from ._models import SkuInfos # type: ignore + from ._models import SlotConfigNamesResource # type: ignore + from ._models import SlotDifference # type: ignore + from ._models import SlotDifferenceCollection # type: ignore + from ._models import SlotSwapStatus # type: ignore + from ._models import SlowRequestsBasedTrigger # type: ignore + from ._models import Snapshot # type: ignore + from ._models import SnapshotCollection # type: ignore + from ._models import SnapshotRecoverySource # type: ignore + from ._models import SnapshotRestoreRequest # type: ignore + from ._models import Solution # type: ignore + from ._models import SourceControl # type: ignore + from ._models import SourceControlCollection # type: ignore + from ._models import StackMajorVersion # type: ignore + from ._models import StackMinorVersion # type: ignore + from ._models import StampCapacity # type: ignore + from ._models import StampCapacityCollection # type: ignore + from ._models import StaticSiteARMResource # type: ignore + from ._models import StaticSiteBuildARMResource # type: ignore + from ._models import StaticSiteBuildCollection # type: ignore + from ._models import StaticSiteBuildProperties # type: ignore + from ._models import StaticSiteCollection # type: ignore + from ._models import StaticSiteCustomDomainOverviewARMResource # type: ignore + from ._models import StaticSiteCustomDomainOverviewCollection # type: ignore + from ._models import StaticSiteCustomDomainRequestPropertiesARMResource # type: ignore + from ._models import StaticSiteFunctionOverviewARMResource # type: ignore + from ._models import StaticSiteFunctionOverviewCollection # type: ignore + from ._models import StaticSitePatchResource # type: ignore + from ._models import StaticSiteResetPropertiesARMResource # type: ignore + from ._models import StaticSiteTemplateOptions # type: ignore + from ._models import StaticSiteUserARMResource # type: ignore + from ._models import StaticSiteUserCollection # type: ignore + from ._models import StaticSiteUserInvitationRequestResource # type: ignore + from ._models import StaticSiteUserInvitationResponseResource # type: ignore + from ._models import StaticSiteUserProvidedFunctionApp # type: ignore + from ._models import StaticSiteUserProvidedFunctionAppARMResource # type: ignore + from ._models import StaticSiteUserProvidedFunctionAppsCollection # type: ignore + from ._models import StaticSiteZipDeploymentARMResource # type: ignore + from ._models import StaticSitesWorkflowPreview # type: ignore + from ._models import StaticSitesWorkflowPreviewRequest # type: ignore + from ._models import Status # type: ignore + from ._models import StatusCodesBasedTrigger # type: ignore + from ._models import StatusCodesRangeBasedTrigger # type: ignore + from ._models import StorageMigrationOptions # type: ignore + from ._models import StorageMigrationResponse # type: ignore + from ._models import StringDictionary # type: ignore + from ._models import StringList # type: ignore + from ._models import SupportTopic # type: ignore + from ._models import SwiftVirtualNetwork # type: ignore + from ._models import TldLegalAgreement # type: ignore + from ._models import TldLegalAgreementCollection # type: ignore + from ._models import TokenStore # type: ignore + from ._models import TopLevelDomain # type: ignore + from ._models import TopLevelDomainAgreementOption # type: ignore + from ._models import TopLevelDomainCollection # type: ignore + from ._models import TriggeredJobHistory # type: ignore + from ._models import TriggeredJobHistoryCollection # type: ignore + from ._models import TriggeredJobRun # type: ignore + from ._models import TriggeredWebJob # type: ignore + from ._models import TriggeredWebJobCollection # type: ignore + from ._models import Twitter # type: ignore + from ._models import TwitterRegistration # type: ignore + from ._models import Usage # type: ignore + from ._models import UsageCollection # type: ignore + from ._models import User # type: ignore + from ._models import ValidateRequest # type: ignore + from ._models import ValidateResponse # type: ignore + from ._models import ValidateResponseError # type: ignore + from ._models import VirtualApplication # type: ignore + from ._models import VirtualDirectory # type: ignore + from ._models import VirtualIPMapping # type: ignore + from ._models import VirtualNetworkProfile # type: ignore + from ._models import VnetGateway # type: ignore + from ._models import VnetInfo # type: ignore + from ._models import VnetParameters # type: ignore + from ._models import VnetRoute # type: ignore + from ._models import VnetValidationFailureDetails # type: ignore + from ._models import VnetValidationTestFailure # type: ignore + from ._models import WebAppCollection # type: ignore + from ._models import WebAppInstanceStatusCollection # type: ignore + from ._models import WebAppMajorVersion # type: ignore + from ._models import WebAppMinorVersion # type: ignore + from ._models import WebAppRuntimeSettings # type: ignore + from ._models import WebAppRuntimes # type: ignore + from ._models import WebAppStack # type: ignore + from ._models import WebAppStackCollection # type: ignore + from ._models import WebJob # type: ignore + from ._models import WebJobCollection # type: ignore + from ._models import WebSiteInstanceStatus # type: ignore + from ._models import WindowsJavaContainerSettings # type: ignore + from ._models import WorkerPoolCollection # type: ignore + from ._models import WorkerPoolResource # type: ignore + +from ._web_site_management_client_enums import ( + AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem, + AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem, + AppServicePlanRestrictions, + AutoHealActionType, + AzureResourceType, + AzureStorageState, + AzureStorageType, + BackupItemStatus, + BackupRestoreOperationType, + BuildStatus, + BuiltInAuthenticationProvider, + CertificateOrderActionType, + CertificateOrderStatus, + CertificateProductType, + Channels, + CheckNameResourceTypes, + ClientCertMode, + CloneAbilityResult, + ComputeModeOptions, + ConnectionStringType, + ContinuousWebJobStatus, + CookieExpirationConvention, + CustomDomainStatus, + CustomHostNameDnsRecordType, + DatabaseType, + DetectorType, + DnsType, + DnsVerificationTestResult, + DomainPatchResourcePropertiesDomainNotRenewableReasonsItem, + DomainPropertiesDomainNotRenewableReasonsItem, + DomainStatus, + DomainType, + Enum4, + Enum5, + Enum6, + Enum7, + Enum8, + Enum9, + ForwardProxyConvention, + FrequencyUnit, + FtpsState, + HostNameType, + HostType, + HostingEnvironmentStatus, + InAvailabilityReasonType, + InsightStatus, + IpFilterTag, + IssueType, + KeyVaultSecretStatus, + LoadBalancingMode, + LogLevel, + MSDeployLogEntryType, + MSDeployProvisioningState, + ManagedPipelineMode, + ManagedServiceIdentityType, + MySqlMigrationType, + NotificationLevel, + OperationStatus, + ProvisioningState, + PublicCertificateLocation, + PublishingProfileFormat, + RedundancyMode, + RenderingType, + ResolveStatus, + ResourceScopeType, + RouteType, + ScmType, + SiteAvailabilityState, + SiteExtensionType, + SiteLoadBalancing, + SiteRuntimeState, + SkuName, + SolutionType, + SslState, + StackPreferredOs, + StatusOptions, + SupportedTlsVersions, + TriggerTypes, + TriggeredWebJobStatus, + UnauthenticatedClientAction, + UnauthenticatedClientActionV2, + UsageState, + ValidateResourceTypes, + WebJobType, + WorkerSizeOptions, +) + +__all__ = [ + 'AbnormalTimePeriod', + 'Address', + 'AddressResponse', + 'AllowedAudiencesValidation', + 'AnalysisData', + 'AnalysisDefinition', + 'ApiDefinitionInfo', + 'ApiKVReference', + 'ApiKVReferenceCollection', + 'ApiManagementConfig', + 'AppInsightsWebAppStackSettings', + 'AppRegistration', + 'AppServiceCertificate', + 'AppServiceCertificateCollection', + 'AppServiceCertificateOrder', + 'AppServiceCertificateOrderCollection', + 'AppServiceCertificateOrderPatchResource', + 'AppServiceCertificatePatchResource', + 'AppServiceCertificateResource', + 'AppServiceEnvironment', + 'AppServiceEnvironmentCollection', + 'AppServiceEnvironmentPatchResource', + 'AppServiceEnvironmentResource', + 'AppServicePlan', + 'AppServicePlanCollection', + 'AppServicePlanPatchResource', + 'Apple', + 'AppleRegistration', + 'ApplicationLogsConfig', + 'ApplicationStack', + 'ApplicationStackCollection', + 'ApplicationStackResource', + 'AppserviceGithubToken', + 'AppserviceGithubTokenRequest', + 'ArmIdWrapper', + 'AseV3NetworkingConfiguration', + 'AuthPlatform', + 'AutoHealActions', + 'AutoHealCustomAction', + 'AutoHealRules', + 'AutoHealTriggers', + 'AzureActiveDirectory', + 'AzureActiveDirectoryLogin', + 'AzureActiveDirectoryRegistration', + 'AzureActiveDirectoryValidation', + 'AzureBlobStorageApplicationLogsConfig', + 'AzureBlobStorageHttpLogsConfig', + 'AzureStaticWebApps', + 'AzureStaticWebAppsRegistration', + 'AzureStorageInfoValue', + 'AzureStoragePropertyDictionaryResource', + 'AzureTableStorageApplicationLogsConfig', + 'BackupItem', + 'BackupItemCollection', + 'BackupRequest', + 'BackupSchedule', + 'BillingMeter', + 'BillingMeterCollection', + 'BlobStorageTokenStore', + 'Capability', + 'Certificate', + 'CertificateCollection', + 'CertificateDetails', + 'CertificateEmail', + 'CertificateOrderAction', + 'CertificateOrderContact', + 'CertificatePatchResource', + 'ClientRegistration', + 'CloningInfo', + 'Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties', + 'ConnStringInfo', + 'ConnStringValueTypePair', + 'ConnectionStringDictionary', + 'Contact', + 'ContainerCpuStatistics', + 'ContainerCpuUsage', + 'ContainerInfo', + 'ContainerMemoryStatistics', + 'ContainerNetworkInterfaceStatistics', + 'ContainerThrottlingData', + 'ContinuousWebJob', + 'ContinuousWebJobCollection', + 'CookieExpiration', + 'CorsSettings', + 'CsmMoveResourceEnvelope', + 'CsmOperationCollection', + 'CsmOperationDescription', + 'CsmOperationDescriptionProperties', + 'CsmOperationDisplay', + 'CsmPublishingCredentialsPoliciesCollection', + 'CsmPublishingCredentialsPoliciesEntity', + 'CsmPublishingProfileOptions', + 'CsmSlotEntity', + 'CsmUsageQuota', + 'CsmUsageQuotaCollection', + 'CustomHostnameAnalysisResult', + 'CustomOpenIdConnectProvider', + 'DataProviderMetadata', + 'DataSource', + 'DataTableResponseColumn', + 'DataTableResponseObject', + 'DatabaseBackupSetting', + 'DefaultErrorResponse', + 'DefaultErrorResponseError', + 'DefaultErrorResponseErrorDetailsItem', + 'DeletedAppRestoreRequest', + 'DeletedSite', + 'DeletedWebAppCollection', + 'Deployment', + 'DeploymentCollection', + 'DeploymentLocations', + 'DetectorAbnormalTimePeriod', + 'DetectorDefinition', + 'DetectorInfo', + 'DetectorResponse', + 'DetectorResponseCollection', + 'DiagnosticAnalysis', + 'DiagnosticAnalysisCollection', + 'DiagnosticCategory', + 'DiagnosticCategoryCollection', + 'DiagnosticData', + 'DiagnosticDetectorCollection', + 'DiagnosticDetectorResponse', + 'DiagnosticMetricSample', + 'DiagnosticMetricSet', + 'Dimension', + 'Domain', + 'DomainAvailabilityCheckResult', + 'DomainCollection', + 'DomainControlCenterSsoRequest', + 'DomainOwnershipIdentifier', + 'DomainOwnershipIdentifierCollection', + 'DomainPatchResource', + 'DomainPurchaseConsent', + 'DomainRecommendationSearchParameters', + 'EnabledConfig', + 'EndpointDependency', + 'EndpointDetail', + 'ErrorEntity', + 'Experiments', + 'Facebook', + 'FileSystemApplicationLogsConfig', + 'FileSystemHttpLogsConfig', + 'FileSystemTokenStore', + 'ForwardProxy', + 'FunctionAppMajorVersion', + 'FunctionAppMinorVersion', + 'FunctionAppRuntimeSettings', + 'FunctionAppRuntimes', + 'FunctionAppStack', + 'FunctionAppStackCollection', + 'FunctionEnvelope', + 'FunctionEnvelopeCollection', + 'FunctionSecrets', + 'GeoRegion', + 'GeoRegionCollection', + 'GitHub', + 'GitHubActionCodeConfiguration', + 'GitHubActionConfiguration', + 'GitHubActionContainerConfiguration', + 'GitHubActionWebAppStackSettings', + 'GlobalCsmSkuDescription', + 'GlobalValidation', + 'Google', + 'HandlerMapping', + 'HostKeys', + 'HostName', + 'HostNameBinding', + 'HostNameBindingCollection', + 'HostNameSslState', + 'HostingEnvironmentDeploymentInfo', + 'HostingEnvironmentDiagnostics', + 'HostingEnvironmentProfile', + 'HttpLogsConfig', + 'HttpSettings', + 'HttpSettingsRoutes', + 'HybridConnection', + 'HybridConnectionCollection', + 'HybridConnectionKey', + 'HybridConnectionLimits', + 'Identifier', + 'IdentifierCollection', + 'IdentityProviders', + 'InboundEnvironmentEndpoint', + 'InboundEnvironmentEndpointCollection', + 'IpSecurityRestriction', + 'JwtClaimChecks', + 'KeyInfo', + 'KeyValuePairStringObject', + 'KubeEnvironmentProfile', + 'LegacyMicrosoftAccount', + 'LinuxJavaContainerSettings', + 'LocalizableString', + 'LogSpecification', + 'Login', + 'LoginRoutes', + 'LoginScopes', + 'MSDeploy', + 'MSDeployLog', + 'MSDeployLogEntry', + 'MSDeployStatus', + 'ManagedServiceIdentity', + 'MetricAvailability', + 'MetricSpecification', + 'MigrateMySqlRequest', + 'MigrateMySqlStatus', + 'NameIdentifier', + 'NameIdentifierCollection', + 'NameValuePair', + 'NetworkFeatures', + 'NetworkTrace', + 'Nonce', + 'OpenIdConnectClientCredential', + 'OpenIdConnectConfig', + 'OpenIdConnectLogin', + 'OpenIdConnectRegistration', + 'Operation', + 'OutboundEnvironmentEndpoint', + 'OutboundEnvironmentEndpointCollection', + 'PerfMonCounterCollection', + 'PerfMonResponse', + 'PerfMonSample', + 'PerfMonSet', + 'PremierAddOn', + 'PremierAddOnOffer', + 'PremierAddOnOfferCollection', + 'PremierAddOnPatchResource', + 'PrivateAccess', + 'PrivateAccessSubnet', + 'PrivateAccessVirtualNetwork', + 'PrivateEndpointConnectionCollection', + 'PrivateLinkConnectionApprovalRequestResource', + 'PrivateLinkConnectionState', + 'PrivateLinkResource', + 'PrivateLinkResourceProperties', + 'PrivateLinkResourcesWrapper', + 'ProcessInfo', + 'ProcessInfoCollection', + 'ProcessModuleInfo', + 'ProcessModuleInfoCollection', + 'ProcessThreadInfo', + 'ProcessThreadInfoCollection', + 'ProxyOnlyResource', + 'PublicCertificate', + 'PublicCertificateCollection', + 'PushSettings', + 'QueryUtterancesResult', + 'QueryUtterancesResults', + 'RampUpRule', + 'Recommendation', + 'RecommendationCollection', + 'RecommendationRule', + 'ReissueCertificateOrderRequest', + 'RelayServiceConnectionEntity', + 'RemotePrivateEndpointConnectionARMResource', + 'Rendering', + 'RenewCertificateOrderRequest', + 'RequestsBasedTrigger', + 'Resource', + 'ResourceCollection', + 'ResourceHealthMetadata', + 'ResourceHealthMetadataCollection', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', + 'ResourceMetricDefinitionCollection', + 'ResourceNameAvailability', + 'ResourceNameAvailabilityRequest', + 'ResponseMetaData', + 'RestoreRequest', + 'SampleUtterance', + 'ServiceSpecification', + 'Site', + 'SiteAuthSettings', + 'SiteAuthSettingsV2', + 'SiteCloneability', + 'SiteCloneabilityCriterion', + 'SiteConfig', + 'SiteConfigPropertiesDictionary', + 'SiteConfigResource', + 'SiteConfigResourceCollection', + 'SiteConfigurationSnapshotInfo', + 'SiteConfigurationSnapshotInfoCollection', + 'SiteExtensionInfo', + 'SiteExtensionInfoCollection', + 'SiteLimits', + 'SiteLogsConfig', + 'SiteMachineKey', + 'SitePatchResource', + 'SitePhpErrorLogFlag', + 'SiteSeal', + 'SiteSealRequest', + 'SiteSourceControl', + 'SkuCapacity', + 'SkuDescription', + 'SkuInfo', + 'SkuInfoCollection', + 'SkuInfos', + 'SlotConfigNamesResource', + 'SlotDifference', + 'SlotDifferenceCollection', + 'SlotSwapStatus', + 'SlowRequestsBasedTrigger', + 'Snapshot', + 'SnapshotCollection', + 'SnapshotRecoverySource', + 'SnapshotRestoreRequest', + 'Solution', + 'SourceControl', + 'SourceControlCollection', + 'StackMajorVersion', + 'StackMinorVersion', + 'StampCapacity', + 'StampCapacityCollection', + 'StaticSiteARMResource', + 'StaticSiteBuildARMResource', + 'StaticSiteBuildCollection', + 'StaticSiteBuildProperties', + 'StaticSiteCollection', + 'StaticSiteCustomDomainOverviewARMResource', + 'StaticSiteCustomDomainOverviewCollection', + 'StaticSiteCustomDomainRequestPropertiesARMResource', + 'StaticSiteFunctionOverviewARMResource', + 'StaticSiteFunctionOverviewCollection', + 'StaticSitePatchResource', + 'StaticSiteResetPropertiesARMResource', + 'StaticSiteTemplateOptions', + 'StaticSiteUserARMResource', + 'StaticSiteUserCollection', + 'StaticSiteUserInvitationRequestResource', + 'StaticSiteUserInvitationResponseResource', + 'StaticSiteUserProvidedFunctionApp', + 'StaticSiteUserProvidedFunctionAppARMResource', + 'StaticSiteUserProvidedFunctionAppsCollection', + 'StaticSiteZipDeploymentARMResource', + 'StaticSitesWorkflowPreview', + 'StaticSitesWorkflowPreviewRequest', + 'Status', + 'StatusCodesBasedTrigger', + 'StatusCodesRangeBasedTrigger', + 'StorageMigrationOptions', + 'StorageMigrationResponse', + 'StringDictionary', + 'StringList', + 'SupportTopic', + 'SwiftVirtualNetwork', + 'TldLegalAgreement', + 'TldLegalAgreementCollection', + 'TokenStore', + 'TopLevelDomain', + 'TopLevelDomainAgreementOption', + 'TopLevelDomainCollection', + 'TriggeredJobHistory', + 'TriggeredJobHistoryCollection', + 'TriggeredJobRun', + 'TriggeredWebJob', + 'TriggeredWebJobCollection', + 'Twitter', + 'TwitterRegistration', + 'Usage', + 'UsageCollection', + 'User', + 'ValidateRequest', + 'ValidateResponse', + 'ValidateResponseError', + 'VirtualApplication', + 'VirtualDirectory', + 'VirtualIPMapping', + 'VirtualNetworkProfile', + 'VnetGateway', + 'VnetInfo', + 'VnetParameters', + 'VnetRoute', + 'VnetValidationFailureDetails', + 'VnetValidationTestFailure', + 'WebAppCollection', + 'WebAppInstanceStatusCollection', + 'WebAppMajorVersion', + 'WebAppMinorVersion', + 'WebAppRuntimeSettings', + 'WebAppRuntimes', + 'WebAppStack', + 'WebAppStackCollection', + 'WebJob', + 'WebJobCollection', + 'WebSiteInstanceStatus', + 'WindowsJavaContainerSettings', + 'WorkerPoolCollection', + 'WorkerPoolResource', + 'AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem', + 'AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem', + 'AppServicePlanRestrictions', + 'AutoHealActionType', + 'AzureResourceType', + 'AzureStorageState', + 'AzureStorageType', + 'BackupItemStatus', + 'BackupRestoreOperationType', + 'BuildStatus', + 'BuiltInAuthenticationProvider', + 'CertificateOrderActionType', + 'CertificateOrderStatus', + 'CertificateProductType', + 'Channels', + 'CheckNameResourceTypes', + 'ClientCertMode', + 'CloneAbilityResult', + 'ComputeModeOptions', + 'ConnectionStringType', + 'ContinuousWebJobStatus', + 'CookieExpirationConvention', + 'CustomDomainStatus', + 'CustomHostNameDnsRecordType', + 'DatabaseType', + 'DetectorType', + 'DnsType', + 'DnsVerificationTestResult', + 'DomainPatchResourcePropertiesDomainNotRenewableReasonsItem', + 'DomainPropertiesDomainNotRenewableReasonsItem', + 'DomainStatus', + 'DomainType', + 'Enum4', + 'Enum5', + 'Enum6', + 'Enum7', + 'Enum8', + 'Enum9', + 'ForwardProxyConvention', + 'FrequencyUnit', + 'FtpsState', + 'HostNameType', + 'HostType', + 'HostingEnvironmentStatus', + 'InAvailabilityReasonType', + 'InsightStatus', + 'IpFilterTag', + 'IssueType', + 'KeyVaultSecretStatus', + 'LoadBalancingMode', + 'LogLevel', + 'MSDeployLogEntryType', + 'MSDeployProvisioningState', + 'ManagedPipelineMode', + 'ManagedServiceIdentityType', + 'MySqlMigrationType', + 'NotificationLevel', + 'OperationStatus', + 'ProvisioningState', + 'PublicCertificateLocation', + 'PublishingProfileFormat', + 'RedundancyMode', + 'RenderingType', + 'ResolveStatus', + 'ResourceScopeType', + 'RouteType', + 'ScmType', + 'SiteAvailabilityState', + 'SiteExtensionType', + 'SiteLoadBalancing', + 'SiteRuntimeState', + 'SkuName', + 'SolutionType', + 'SslState', + 'StackPreferredOs', + 'StatusOptions', + 'SupportedTlsVersions', + 'TriggerTypes', + 'TriggeredWebJobStatus', + 'UnauthenticatedClientAction', + 'UnauthenticatedClientActionV2', + 'UsageState', + 'ValidateResourceTypes', + 'WebJobType', + 'WorkerSizeOptions', +] diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_models.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_models.py new file mode 100644 index 000000000000..5ff291f7efae --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_models.py @@ -0,0 +1,18795 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AbnormalTimePeriod(msrest.serialization.Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime. + :type start_time: ~datetime.datetime + :param end_time: End time of the downtime. + :type end_time: ~datetime.datetime + :param events: List of Possible Cause of downtime. + :type events: list[~azure.mgmt.web.v2020_12_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions. + :type solutions: list[~azure.mgmt.web.v2020_12_01.models.Solution] + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'events': {'key': 'events', 'type': '[DetectorAbnormalTimePeriod]'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__( + self, + **kwargs + ): + super(AbnormalTimePeriod, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.events = kwargs.get('events', None) + self.solutions = kwargs.get('solutions', None) + + +class Address(msrest.serialization.Model): + """Address information for domain registration. + + All required parameters must be populated in order to send to Azure. + + :param address1: Required. First line of an Address. + :type address1: str + :param address2: The second line of the Address. Optional. + :type address2: str + :param city: Required. The city for the address. + :type city: str + :param country: Required. The country for the address. + :type country: str + :param postal_code: Required. The postal code for the address. + :type postal_code: str + :param state: Required. The state or province for the address. + :type state: str + """ + + _validation = { + 'address1': {'required': True}, + 'city': {'required': True}, + 'country': {'required': True}, + 'postal_code': {'required': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'address1': {'key': 'address1', 'type': 'str'}, + 'address2': {'key': 'address2', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Address, self).__init__(**kwargs) + self.address1 = kwargs['address1'] + self.address2 = kwargs.get('address2', None) + self.city = kwargs['city'] + self.country = kwargs['country'] + self.postal_code = kwargs['postal_code'] + self.state = kwargs['state'] + + +class ProxyOnlyResource(msrest.serialization.Model): + """Azure proxy only resource. This resource is not tracked by Azure Resource Manager. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kwargs.get('kind', None) + self.type = None + + +class AddressResponse(ProxyOnlyResource): + """Describes main public IP address and any extra virtual IPs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param service_ip_address: Main public virtual IP. + :type service_ip_address: str + :param internal_ip_address: Virtual Network internal IP address of the App Service Environment + if it is in internal load-balancing mode. + :type internal_ip_address: str + :param outbound_ip_addresses: IP addresses appearing on outbound connections. + :type outbound_ip_addresses: list[str] + :param vip_mappings: Additional virtual IPs. + :type vip_mappings: list[~azure.mgmt.web.v2020_12_01.models.VirtualIPMapping] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_ip_address': {'key': 'properties.serviceIpAddress', 'type': 'str'}, + 'internal_ip_address': {'key': 'properties.internalIpAddress', 'type': 'str'}, + 'outbound_ip_addresses': {'key': 'properties.outboundIpAddresses', 'type': '[str]'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressResponse, self).__init__(**kwargs) + self.service_ip_address = kwargs.get('service_ip_address', None) + self.internal_ip_address = kwargs.get('internal_ip_address', None) + self.outbound_ip_addresses = kwargs.get('outbound_ip_addresses', None) + self.vip_mappings = kwargs.get('vip_mappings', None) + + +class AllowedAudiencesValidation(ProxyOnlyResource): + """AllowedAudiencesValidation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param allowed_audiences: + :type allowed_audiences: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AllowedAudiencesValidation, self).__init__(**kwargs) + self.allowed_audiences = kwargs.get('allowed_audiences', None) + + +class AnalysisData(msrest.serialization.Model): + """Class Representing Detector Evidence used for analysis. + + :param source: Name of the Detector. + :type source: str + :param detector_definition: Detector Definition. + :type detector_definition: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition + :param metrics: Source Metrics. + :type metrics: list[~azure.mgmt.web.v2020_12_01.models.DiagnosticMetricSet] + :param data: Additional Source Data. + :type data: list[list[~azure.mgmt.web.v2020_12_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data. + :type detector_meta_data: ~azure.mgmt.web.v2020_12_01.models.ResponseMetaData + """ + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'detector_definition': {'key': 'detectorDefinition', 'type': 'DetectorDefinition'}, + 'metrics': {'key': 'metrics', 'type': '[DiagnosticMetricSet]'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'detector_meta_data': {'key': 'detectorMetaData', 'type': 'ResponseMetaData'}, + } + + def __init__( + self, + **kwargs + ): + super(AnalysisData, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.detector_definition = kwargs.get('detector_definition', None) + self.metrics = kwargs.get('metrics', None) + self.data = kwargs.get('data', None) + self.detector_meta_data = kwargs.get('detector_meta_data', None) + + +class AnalysisDefinition(ProxyOnlyResource): + """Definition of Analysis. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar description: Description of the Analysis. + :vartype description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AnalysisDefinition, self).__init__(**kwargs) + self.description = None + + +class ApiDefinitionInfo(msrest.serialization.Model): + """Information about the formal API definition for the app. + + :param url: The URL of the API definition. + :type url: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + + +class ApiKVReference(ProxyOnlyResource): + """Description of site key vault references. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param reference: + :type reference: str + :param status: Possible values include: "Initialized", "Resolved", "InvalidSyntax", + "MSINotEnabled", "VaultNotFound", "SecretNotFound", "SecretVersionNotFound", + "AccessToKeyVaultDenied", "OtherReasons", "FetchTimedOut", "UnauthorizedClient". + :type status: str or ~azure.mgmt.web.v2020_12_01.models.ResolveStatus + :param vault_name: + :type vault_name: str + :param secret_name: + :type secret_name: str + :param secret_version: + :type secret_version: str + :param identity_type: Managed service identity. + :type identity_type: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :param details: + :type details: str + :ivar source: Default value: "KeyVault". + :vartype source: str + :param active_version: + :type active_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'reference': {'key': 'properties.reference', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'secret_name': {'key': 'properties.secretName', 'type': 'str'}, + 'secret_version': {'key': 'properties.secretVersion', 'type': 'str'}, + 'identity_type': {'key': 'properties.identityType', 'type': 'ManagedServiceIdentity'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'active_version': {'key': 'properties.activeVersion', 'type': 'str'}, + } + + source = "KeyVault" + + def __init__( + self, + **kwargs + ): + super(ApiKVReference, self).__init__(**kwargs) + self.reference = kwargs.get('reference', None) + self.status = kwargs.get('status', None) + self.vault_name = kwargs.get('vault_name', None) + self.secret_name = kwargs.get('secret_name', None) + self.secret_version = kwargs.get('secret_version', None) + self.identity_type = kwargs.get('identity_type', None) + self.details = kwargs.get('details', None) + self.active_version = kwargs.get('active_version', None) + + +class ApiKVReferenceCollection(msrest.serialization.Model): + """ApiKVReferenceCollection. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ApiKVReference] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApiKVReference]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApiKVReferenceCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class ApiManagementConfig(msrest.serialization.Model): + """Azure API management (APIM) configuration linked to the app. + + :param id: APIM-Api Identifier. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApiManagementConfig, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class AppInsightsWebAppStackSettings(msrest.serialization.Model): + """App Insights Web App stack settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar is_supported: :code:`true` if remote Application Insights is supported for + the stack; otherwise, :code:`false`. + :vartype is_supported: bool + :ivar is_default_off: :code:`true` if Application Insights is disabled by default + for the stack; otherwise, :code:`false`. + :vartype is_default_off: bool + """ + + _validation = { + 'is_supported': {'readonly': True}, + 'is_default_off': {'readonly': True}, + } + + _attribute_map = { + 'is_supported': {'key': 'isSupported', 'type': 'bool'}, + 'is_default_off': {'key': 'isDefaultOff', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AppInsightsWebAppStackSettings, self).__init__(**kwargs) + self.is_supported = None + self.is_default_off = None + + +class Apple(ProxyOnlyResource): + """Apple. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.AppleRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.LoginScopes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'AppleRegistration'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + } + + def __init__( + self, + **kwargs + ): + super(Apple, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.registration = kwargs.get('registration', None) + self.login = kwargs.get('login', None) + + +class AppleRegistration(ProxyOnlyResource): + """AppleRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param client_id: + :type client_id: str + :param client_secret_setting_name: + :type client_secret_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppleRegistration, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_secret_setting_name = kwargs.get('client_secret_setting_name', None) + + +class ApplicationLogsConfig(msrest.serialization.Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: ~azure.mgmt.web.v2020_12_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2020_12_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2020_12_01.models.AzureBlobStorageApplicationLogsConfig + """ + + _attribute_map = { + 'file_system': {'key': 'fileSystem', 'type': 'FileSystemApplicationLogsConfig'}, + 'azure_table_storage': {'key': 'azureTableStorage', 'type': 'AzureTableStorageApplicationLogsConfig'}, + 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageApplicationLogsConfig'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationLogsConfig, self).__init__(**kwargs) + self.file_system = kwargs.get('file_system', None) + self.azure_table_storage = kwargs.get('azure_table_storage', None) + self.azure_blob_storage = kwargs.get('azure_blob_storage', None) + + +class ApplicationStack(msrest.serialization.Model): + """Application stack. + + :param name: Application stack name. + :type name: str + :param display: Application stack display name. + :type display: str + :param dependency: Application stack dependency. + :type dependency: str + :param major_versions: List of major versions available. + :type major_versions: list[~azure.mgmt.web.v2020_12_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: list[~azure.mgmt.web.v2020_12_01.models.ApplicationStack] + :param is_deprecated: :code:`true` if this is the stack is deprecated; otherwise, + :code:`false`. + :type is_deprecated: list[~azure.mgmt.web.v2020_12_01.models.ApplicationStack] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'str'}, + 'dependency': {'key': 'dependency', 'type': 'str'}, + 'major_versions': {'key': 'majorVersions', 'type': '[StackMajorVersion]'}, + 'frameworks': {'key': 'frameworks', 'type': '[ApplicationStack]'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': '[ApplicationStack]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationStack, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.dependency = kwargs.get('dependency', None) + self.major_versions = kwargs.get('major_versions', None) + self.frameworks = kwargs.get('frameworks', None) + self.is_deprecated = kwargs.get('is_deprecated', None) + + +class ApplicationStackCollection(msrest.serialization.Model): + """Collection of Application Stacks. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ApplicationStackResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationStackResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationStackCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class ApplicationStackResource(ProxyOnlyResource): + """ARM resource for a ApplicationStack. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param name_properties_name: Application stack name. + :type name_properties_name: str + :param display: Application stack display name. + :type display: str + :param dependency: Application stack dependency. + :type dependency: str + :param major_versions: List of major versions available. + :type major_versions: list[~azure.mgmt.web.v2020_12_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: list[~azure.mgmt.web.v2020_12_01.models.ApplicationStack] + :param is_deprecated: :code:`true` if this is the stack is deprecated; otherwise, + :code:`false`. + :type is_deprecated: list[~azure.mgmt.web.v2020_12_01.models.ApplicationStack] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'display': {'key': 'properties.display', 'type': 'str'}, + 'dependency': {'key': 'properties.dependency', 'type': 'str'}, + 'major_versions': {'key': 'properties.majorVersions', 'type': '[StackMajorVersion]'}, + 'frameworks': {'key': 'properties.frameworks', 'type': '[ApplicationStack]'}, + 'is_deprecated': {'key': 'properties.isDeprecated', 'type': '[ApplicationStack]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationStackResource, self).__init__(**kwargs) + self.name_properties_name = kwargs.get('name_properties_name', None) + self.display = kwargs.get('display', None) + self.dependency = kwargs.get('dependency', None) + self.major_versions = kwargs.get('major_versions', None) + self.frameworks = kwargs.get('frameworks', None) + self.is_deprecated = kwargs.get('is_deprecated', None) + + +class AppRegistration(ProxyOnlyResource): + """AppRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param app_id: + :type app_id: str + :param app_secret_setting_name: + :type app_secret_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'app_id': {'key': 'properties.appId', 'type': 'str'}, + 'app_secret_setting_name': {'key': 'properties.appSecretSettingName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppRegistration, self).__init__(**kwargs) + self.app_id = kwargs.get('app_id', None) + self.app_secret_setting_name = kwargs.get('app_secret_setting_name', None) + + +class AppServiceCertificate(msrest.serialization.Model): + """Key Vault container for a certificate that is purchased through Azure. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param key_vault_id: Key Vault resource Id. + :type key_vault_id: str + :param key_vault_secret_name: Key Vault secret name. + :type key_vault_secret_name: str + :ivar provisioning_state: Status of the Key Vault secret. Possible values include: + "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", + "Unknown". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.KeyVaultSecretStatus + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'keyVaultSecretName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceCertificate, self).__init__(**kwargs) + self.key_vault_id = kwargs.get('key_vault_id', None) + self.key_vault_secret_name = kwargs.get('key_vault_secret_name', None) + self.provisioning_state = None + + +class AppServiceCertificateCollection(msrest.serialization.Model): + """Collection of certificate order certificates. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppServiceCertificateResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceCertificateCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class Resource(msrest.serialization.Model): + """Azure resource. This resource is tracked in Azure Resource Manager. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kwargs.get('kind', None) + self.location = kwargs['location'] + self.type = None + self.tags = kwargs.get('tags', None) + + +class AppServiceCertificateOrder(Resource): + """SSL certificate purchase order. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificate] + :param distinguished_name: Certificate distinguished name. + :type distinguished_name: str + :ivar domain_verification_token: Domain verification token. + :vartype domain_verification_token: str + :param validity_in_years: Duration in years (must be 1). + :type validity_in_years: int + :param key_size: Certificate key size. + :type key_size: int + :param product_type: Certificate product type. Possible values include: + "StandardDomainValidatedSsl", "StandardDomainValidatedWildCardSsl". + :type product_type: str or ~azure.mgmt.web.v2020_12_01.models.CertificateProductType + :param auto_renew: :code:`true` if the certificate should be automatically renewed + when it expires; otherwise, :code:`false`. + :type auto_renew: bool + :ivar provisioning_state: Status of certificate order. Possible values include: "Succeeded", + "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar status: Current order status. Possible values include: "Pendingissuance", "Issued", + "Revoked", "Canceled", "Denied", "Pendingrevocation", "PendingRekey", "Unused", "Expired", + "NotSubmitted". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :param csr: Last CSR that was created for this order. + :type csr: str + :ivar intermediate: Intermediate certificate. + :vartype intermediate: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :ivar serial_number: Current serial number of the certificate. + :vartype serial_number: str + :ivar last_certificate_issuance_time: Certificate last issuance time. + :vartype last_certificate_issuance_time: ~datetime.datetime + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: ~datetime.datetime + :ivar is_private_key_external: :code:`true` if private key is external; otherwise, + :code:`false`. + :vartype is_private_key_external: bool + :ivar app_service_certificate_not_renewable_reasons: Reasons why App Service Certificate is not + renewable at the current moment. + :vartype app_service_certificate_not_renewable_reasons: list[str or + ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would be auto renewed next. + :vartype next_auto_renewal_time_stamp: ~datetime.datetime + :ivar contact: Contact info. + :vartype contact: ~azure.mgmt.web.v2020_12_01.models.CertificateOrderContact + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'signed_certificate': {'readonly': True}, + 'intermediate': {'readonly': True}, + 'root': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'last_certificate_issuance_time': {'readonly': True}, + 'expiration_time': {'readonly': True}, + 'is_private_key_external': {'readonly': True}, + 'app_service_certificate_not_renewable_reasons': {'readonly': True}, + 'next_auto_renewal_time_stamp': {'readonly': True}, + 'contact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'certificates': {'key': 'properties.certificates', 'type': '{AppServiceCertificate}'}, + 'distinguished_name': {'key': 'properties.distinguishedName', 'type': 'str'}, + 'domain_verification_token': {'key': 'properties.domainVerificationToken', 'type': 'str'}, + 'validity_in_years': {'key': 'properties.validityInYears', 'type': 'int'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'product_type': {'key': 'properties.productType', 'type': 'str'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'signed_certificate': {'key': 'properties.signedCertificate', 'type': 'CertificateDetails'}, + 'csr': {'key': 'properties.csr', 'type': 'str'}, + 'intermediate': {'key': 'properties.intermediate', 'type': 'CertificateDetails'}, + 'root': {'key': 'properties.root', 'type': 'CertificateDetails'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'last_certificate_issuance_time': {'key': 'properties.lastCertificateIssuanceTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, + 'app_service_certificate_not_renewable_reasons': {'key': 'properties.appServiceCertificateNotRenewableReasons', 'type': '[str]'}, + 'next_auto_renewal_time_stamp': {'key': 'properties.nextAutoRenewalTimeStamp', 'type': 'iso-8601'}, + 'contact': {'key': 'properties.contact', 'type': 'CertificateOrderContact'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceCertificateOrder, self).__init__(**kwargs) + self.certificates = kwargs.get('certificates', None) + self.distinguished_name = kwargs.get('distinguished_name', None) + self.domain_verification_token = None + self.validity_in_years = kwargs.get('validity_in_years', 1) + self.key_size = kwargs.get('key_size', 2048) + self.product_type = kwargs.get('product_type', None) + self.auto_renew = kwargs.get('auto_renew', True) + self.provisioning_state = None + self.status = None + self.signed_certificate = None + self.csr = kwargs.get('csr', None) + self.intermediate = None + self.root = None + self.serial_number = None + self.last_certificate_issuance_time = None + self.expiration_time = None + self.is_private_key_external = None + self.app_service_certificate_not_renewable_reasons = None + self.next_auto_renewal_time_stamp = None + self.contact = None + + +class AppServiceCertificateOrderCollection(msrest.serialization.Model): + """Collection of certificate orders. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppServiceCertificateOrder]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceCertificateOrderCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class AppServiceCertificateOrderPatchResource(ProxyOnlyResource): + """ARM resource for a certificate order that is purchased through Azure. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificate] + :param distinguished_name: Certificate distinguished name. + :type distinguished_name: str + :ivar domain_verification_token: Domain verification token. + :vartype domain_verification_token: str + :param validity_in_years: Duration in years (must be 1). + :type validity_in_years: int + :param key_size: Certificate key size. + :type key_size: int + :param product_type: Certificate product type. Possible values include: + "StandardDomainValidatedSsl", "StandardDomainValidatedWildCardSsl". + :type product_type: str or ~azure.mgmt.web.v2020_12_01.models.CertificateProductType + :param auto_renew: :code:`true` if the certificate should be automatically renewed + when it expires; otherwise, :code:`false`. + :type auto_renew: bool + :ivar provisioning_state: Status of certificate order. Possible values include: "Succeeded", + "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar status: Current order status. Possible values include: "Pendingissuance", "Issued", + "Revoked", "Canceled", "Denied", "Pendingrevocation", "PendingRekey", "Unused", "Expired", + "NotSubmitted". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :param csr: Last CSR that was created for this order. + :type csr: str + :ivar intermediate: Intermediate certificate. + :vartype intermediate: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :ivar serial_number: Current serial number of the certificate. + :vartype serial_number: str + :ivar last_certificate_issuance_time: Certificate last issuance time. + :vartype last_certificate_issuance_time: ~datetime.datetime + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: ~datetime.datetime + :ivar is_private_key_external: :code:`true` if private key is external; otherwise, + :code:`false`. + :vartype is_private_key_external: bool + :ivar app_service_certificate_not_renewable_reasons: Reasons why App Service Certificate is not + renewable at the current moment. + :vartype app_service_certificate_not_renewable_reasons: list[str or + ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would be auto renewed next. + :vartype next_auto_renewal_time_stamp: ~datetime.datetime + :ivar contact: Contact info. + :vartype contact: ~azure.mgmt.web.v2020_12_01.models.CertificateOrderContact + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'signed_certificate': {'readonly': True}, + 'intermediate': {'readonly': True}, + 'root': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'last_certificate_issuance_time': {'readonly': True}, + 'expiration_time': {'readonly': True}, + 'is_private_key_external': {'readonly': True}, + 'app_service_certificate_not_renewable_reasons': {'readonly': True}, + 'next_auto_renewal_time_stamp': {'readonly': True}, + 'contact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'certificates': {'key': 'properties.certificates', 'type': '{AppServiceCertificate}'}, + 'distinguished_name': {'key': 'properties.distinguishedName', 'type': 'str'}, + 'domain_verification_token': {'key': 'properties.domainVerificationToken', 'type': 'str'}, + 'validity_in_years': {'key': 'properties.validityInYears', 'type': 'int'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'product_type': {'key': 'properties.productType', 'type': 'str'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'signed_certificate': {'key': 'properties.signedCertificate', 'type': 'CertificateDetails'}, + 'csr': {'key': 'properties.csr', 'type': 'str'}, + 'intermediate': {'key': 'properties.intermediate', 'type': 'CertificateDetails'}, + 'root': {'key': 'properties.root', 'type': 'CertificateDetails'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'last_certificate_issuance_time': {'key': 'properties.lastCertificateIssuanceTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, + 'app_service_certificate_not_renewable_reasons': {'key': 'properties.appServiceCertificateNotRenewableReasons', 'type': '[str]'}, + 'next_auto_renewal_time_stamp': {'key': 'properties.nextAutoRenewalTimeStamp', 'type': 'iso-8601'}, + 'contact': {'key': 'properties.contact', 'type': 'CertificateOrderContact'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceCertificateOrderPatchResource, self).__init__(**kwargs) + self.certificates = kwargs.get('certificates', None) + self.distinguished_name = kwargs.get('distinguished_name', None) + self.domain_verification_token = None + self.validity_in_years = kwargs.get('validity_in_years', 1) + self.key_size = kwargs.get('key_size', 2048) + self.product_type = kwargs.get('product_type', None) + self.auto_renew = kwargs.get('auto_renew', True) + self.provisioning_state = None + self.status = None + self.signed_certificate = None + self.csr = kwargs.get('csr', None) + self.intermediate = None + self.root = None + self.serial_number = None + self.last_certificate_issuance_time = None + self.expiration_time = None + self.is_private_key_external = None + self.app_service_certificate_not_renewable_reasons = None + self.next_auto_renewal_time_stamp = None + self.contact = None + + +class AppServiceCertificatePatchResource(ProxyOnlyResource): + """Key Vault container ARM resource for a certificate that is purchased through Azure. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param key_vault_id: Key Vault resource Id. + :type key_vault_id: str + :param key_vault_secret_name: Key Vault secret name. + :type key_vault_secret_name: str + :ivar provisioning_state: Status of the Key Vault secret. Possible values include: + "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", + "Unknown". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.KeyVaultSecretStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceCertificatePatchResource, self).__init__(**kwargs) + self.key_vault_id = kwargs.get('key_vault_id', None) + self.key_vault_secret_name = kwargs.get('key_vault_secret_name', None) + self.provisioning_state = None + + +class AppServiceCertificateResource(Resource): + """Key Vault container ARM resource for a certificate that is purchased through Azure. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param key_vault_id: Key Vault resource Id. + :type key_vault_id: str + :param key_vault_secret_name: Key Vault secret name. + :type key_vault_secret_name: str + :ivar provisioning_state: Status of the Key Vault secret. Possible values include: + "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", + "Unknown". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.KeyVaultSecretStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceCertificateResource, self).__init__(**kwargs) + self.key_vault_id = kwargs.get('key_vault_id', None) + self.key_vault_secret_name = kwargs.get('key_vault_secret_name', None) + self.provisioning_state = None + + +class AppServiceEnvironment(msrest.serialization.Model): + """Description of an App Service Environment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar provisioning_state: Provisioning state of the App Service Environment. Possible values + include: "Succeeded", "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar status: Current status of the App Service Environment. Possible values include: + "Preparing", "Ready", "Scaling", "Deleting". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentStatus + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: ~azure.mgmt.web.v2020_12_01.models.VirtualNetworkProfile + :param internal_load_balancing_mode: Specifies which endpoints to serve internally in the + Virtual Network for the App Service Environment. Possible values include: "None", "Web", + "Publishing", "Web, Publishing". + :type internal_load_balancing_mode: str or ~azure.mgmt.web.v2020_12_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :ivar multi_role_count: Number of front-end instances. + :vartype multi_role_count: int + :param ipssl_address_count: Number of IP SSL addresses reserved for the App Service + Environment. + :type ipssl_address_count: int + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service Environment. + :vartype maximum_number_of_machines: int + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar suspended: :code:`true` if the App Service Environment is suspended; + otherwise, :code:`false`. The environment can be suspended, e.g. when the + management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :vartype suspended: bool + :param cluster_settings: Custom settings for changing the behavior of the App Service + Environment. + :type cluster_settings: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db. + :type user_whitelisted_ip_ranges: list[str] + :ivar has_linux_workers: Flag that displays whether an ASE has linux workers or not. + :vartype has_linux_workers: bool + :ivar dedicated_host_count: Dedicated Host Count. + :vartype dedicated_host_count: int + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'multi_role_count': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'suspended': {'readonly': True}, + 'has_linux_workers': {'readonly': True}, + 'dedicated_host_count': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'str'}, + 'multi_size': {'key': 'multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'dedicated_host_count': {'key': 'dedicatedHostCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceEnvironment, self).__init__(**kwargs) + self.provisioning_state = None + self.status = None + self.virtual_network = kwargs['virtual_network'] + self.internal_load_balancing_mode = kwargs.get('internal_load_balancing_mode', None) + self.multi_size = kwargs.get('multi_size', None) + self.multi_role_count = None + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.dns_suffix = kwargs.get('dns_suffix', None) + self.maximum_number_of_machines = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.suspended = None + self.cluster_settings = kwargs.get('cluster_settings', None) + self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) + self.has_linux_workers = None + self.dedicated_host_count = None + + +class AppServiceEnvironmentCollection(msrest.serialization.Model): + """Collection of App Service Environments. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceEnvironmentCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class AppServiceEnvironmentPatchResource(ProxyOnlyResource): + """ARM resource for a app service environment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: Provisioning state of the App Service Environment. Possible values + include: "Succeeded", "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar status: Current status of the App Service Environment. Possible values include: + "Preparing", "Ready", "Scaling", "Deleting". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentStatus + :param virtual_network: Description of the Virtual Network. + :type virtual_network: ~azure.mgmt.web.v2020_12_01.models.VirtualNetworkProfile + :param internal_load_balancing_mode: Specifies which endpoints to serve internally in the + Virtual Network for the App Service Environment. Possible values include: "None", "Web", + "Publishing", "Web, Publishing". + :type internal_load_balancing_mode: str or ~azure.mgmt.web.v2020_12_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :ivar multi_role_count: Number of front-end instances. + :vartype multi_role_count: int + :param ipssl_address_count: Number of IP SSL addresses reserved for the App Service + Environment. + :type ipssl_address_count: int + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service Environment. + :vartype maximum_number_of_machines: int + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar suspended: :code:`true` if the App Service Environment is suspended; + otherwise, :code:`false`. The environment can be suspended, e.g. when the + management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :vartype suspended: bool + :param cluster_settings: Custom settings for changing the behavior of the App Service + Environment. + :type cluster_settings: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db. + :type user_whitelisted_ip_ranges: list[str] + :ivar has_linux_workers: Flag that displays whether an ASE has linux workers or not. + :vartype has_linux_workers: bool + :ivar dedicated_host_count: Dedicated Host Count. + :vartype dedicated_host_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'multi_role_count': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'suspended': {'readonly': True}, + 'has_linux_workers': {'readonly': True}, + 'dedicated_host_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'str'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'properties.hasLinuxWorkers', 'type': 'bool'}, + 'dedicated_host_count': {'key': 'properties.dedicatedHostCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceEnvironmentPatchResource, self).__init__(**kwargs) + self.provisioning_state = None + self.status = None + self.virtual_network = kwargs.get('virtual_network', None) + self.internal_load_balancing_mode = kwargs.get('internal_load_balancing_mode', None) + self.multi_size = kwargs.get('multi_size', None) + self.multi_role_count = None + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.dns_suffix = kwargs.get('dns_suffix', None) + self.maximum_number_of_machines = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.suspended = None + self.cluster_settings = kwargs.get('cluster_settings', None) + self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) + self.has_linux_workers = None + self.dedicated_host_count = None + + +class AppServiceEnvironmentResource(Resource): + """App Service Environment ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Provisioning state of the App Service Environment. Possible values + include: "Succeeded", "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar status: Current status of the App Service Environment. Possible values include: + "Preparing", "Ready", "Scaling", "Deleting". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentStatus + :param virtual_network: Description of the Virtual Network. + :type virtual_network: ~azure.mgmt.web.v2020_12_01.models.VirtualNetworkProfile + :param internal_load_balancing_mode: Specifies which endpoints to serve internally in the + Virtual Network for the App Service Environment. Possible values include: "None", "Web", + "Publishing", "Web, Publishing". + :type internal_load_balancing_mode: str or ~azure.mgmt.web.v2020_12_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :ivar multi_role_count: Number of front-end instances. + :vartype multi_role_count: int + :param ipssl_address_count: Number of IP SSL addresses reserved for the App Service + Environment. + :type ipssl_address_count: int + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service Environment. + :vartype maximum_number_of_machines: int + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar suspended: :code:`true` if the App Service Environment is suspended; + otherwise, :code:`false`. The environment can be suspended, e.g. when the + management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :vartype suspended: bool + :param cluster_settings: Custom settings for changing the behavior of the App Service + Environment. + :type cluster_settings: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db. + :type user_whitelisted_ip_ranges: list[str] + :ivar has_linux_workers: Flag that displays whether an ASE has linux workers or not. + :vartype has_linux_workers: bool + :ivar dedicated_host_count: Dedicated Host Count. + :vartype dedicated_host_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'multi_role_count': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'suspended': {'readonly': True}, + 'has_linux_workers': {'readonly': True}, + 'dedicated_host_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'str'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'properties.hasLinuxWorkers', 'type': 'bool'}, + 'dedicated_host_count': {'key': 'properties.dedicatedHostCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServiceEnvironmentResource, self).__init__(**kwargs) + self.provisioning_state = None + self.status = None + self.virtual_network = kwargs.get('virtual_network', None) + self.internal_load_balancing_mode = kwargs.get('internal_load_balancing_mode', None) + self.multi_size = kwargs.get('multi_size', None) + self.multi_role_count = None + self.ipssl_address_count = kwargs.get('ipssl_address_count', None) + self.dns_suffix = kwargs.get('dns_suffix', None) + self.maximum_number_of_machines = None + self.front_end_scale_factor = kwargs.get('front_end_scale_factor', None) + self.suspended = None + self.cluster_settings = kwargs.get('cluster_settings', None) + self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) + self.has_linux_workers = None + self.dedicated_host_count = None + + +class AppserviceGithubToken(msrest.serialization.Model): + """Github access token for Appservice CLI github integration. + + :param access_token: Github access token for Appservice CLI github integration. + :type access_token: str + :param scope: Scope of the github access token. + :type scope: str + :param token_type: token type. + :type token_type: str + :param got_token: True if valid github token received, False otherwise. + :type got_token: bool + :param error_message: Error message if unable to get token. + :type error_message: str + """ + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'got_token': {'key': 'gotToken', 'type': 'bool'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppserviceGithubToken, self).__init__(**kwargs) + self.access_token = kwargs.get('access_token', None) + self.scope = kwargs.get('scope', None) + self.token_type = kwargs.get('token_type', None) + self.got_token = kwargs.get('got_token', None) + self.error_message = kwargs.get('error_message', None) + + +class AppserviceGithubTokenRequest(msrest.serialization.Model): + """Appservice Github token request content. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Code string to exchange for Github Access token. + :type code: str + :param state: Required. State string used for verification. + :type state: str + """ + + _validation = { + 'code': {'required': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppserviceGithubTokenRequest, self).__init__(**kwargs) + self.code = kwargs['code'] + self.state = kwargs['state'] + + +class AppServicePlan(Resource): + """App Service plan. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: Description of a SKU for a scalable resource. + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param worker_tier_name: Target worker tier assigned to the App Service plan. + :type worker_tier_name: str + :ivar status: App Service plan status. Possible values include: "Ready", "Pending", "Creating". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param hosting_environment_profile: Specification for the App Service Environment to use for + the App Service plan. + :type hosting_environment_profile: ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :ivar maximum_number_of_workers: Maximum number of instances that can be assigned to this App + Service plan. + :vartype maximum_number_of_workers: int + :ivar geo_region: Geographical location for the App Service plan. + :vartype geo_region: str + :param per_site_scaling: If :code:`true`, apps assigned to this App Service plan + can be scaled independently. + If :code:`false`, apps assigned to this App Service plan will scale to all + instances of the plan. + :type per_site_scaling: bool + :param maximum_elastic_worker_count: Maximum number of total workers allowed for this + ElasticScaleEnabled App Service Plan. + :type maximum_elastic_worker_count: int + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If :code:`true`, this App Service Plan owns spot instances. + :type is_spot: bool + :param spot_expiration_time: The time when the server farm expires. Valid only if it is a spot + server farm. + :type spot_expiration_time: ~datetime.datetime + :param free_offer_expiration_time: The time when the server farm free offer expires. + :type free_offer_expiration_time: ~datetime.datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan :code:`true`, + :code:`false` otherwise. + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan :code:`true`, + :code:`false` otherwise. + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan :code:`true`, + :code:`false` otherwise. + :type hyper_v: bool + :param target_worker_count: Scaling worker count. + :type target_worker_count: int + :param target_worker_size_id: Scaling worker size ID. + :type target_worker_size_id: int + :ivar provisioning_state: Provisioning state of the App Service Plan. Possible values include: + "Succeeded", "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :param kube_environment_profile: Specification for the Kubernetes Environment to use for the + App Service plan. + :type kube_environment_profile: ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'subscription': {'readonly': True}, + 'maximum_number_of_workers': {'readonly': True}, + 'geo_region': {'readonly': True}, + 'number_of_sites': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'maximum_number_of_workers': {'key': 'properties.maximumNumberOfWorkers', 'type': 'int'}, + 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, + 'per_site_scaling': {'key': 'properties.perSiteScaling', 'type': 'bool'}, + 'maximum_elastic_worker_count': {'key': 'properties.maximumElasticWorkerCount', 'type': 'int'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'free_offer_expiration_time': {'key': 'properties.freeOfferExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, + 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, + 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServicePlan, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.worker_tier_name = kwargs.get('worker_tier_name', None) + self.status = None + self.subscription = None + self.hosting_environment_profile = kwargs.get('hosting_environment_profile', None) + self.maximum_number_of_workers = None + self.geo_region = None + self.per_site_scaling = kwargs.get('per_site_scaling', False) + self.maximum_elastic_worker_count = kwargs.get('maximum_elastic_worker_count', None) + self.number_of_sites = None + self.is_spot = kwargs.get('is_spot', None) + self.spot_expiration_time = kwargs.get('spot_expiration_time', None) + self.free_offer_expiration_time = kwargs.get('free_offer_expiration_time', None) + self.resource_group = None + self.reserved = kwargs.get('reserved', False) + self.is_xenon = kwargs.get('is_xenon', False) + self.hyper_v = kwargs.get('hyper_v', False) + self.target_worker_count = kwargs.get('target_worker_count', None) + self.target_worker_size_id = kwargs.get('target_worker_size_id', None) + self.provisioning_state = None + self.kube_environment_profile = kwargs.get('kube_environment_profile', None) + + +class AppServicePlanCollection(msrest.serialization.Model): + """Collection of App Service plans. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppServicePlan]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServicePlanCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class AppServicePlanPatchResource(ProxyOnlyResource): + """ARM resource for a app service plan. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param worker_tier_name: Target worker tier assigned to the App Service plan. + :type worker_tier_name: str + :ivar status: App Service plan status. Possible values include: "Ready", "Pending", "Creating". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param hosting_environment_profile: Specification for the App Service Environment to use for + the App Service plan. + :type hosting_environment_profile: ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :ivar maximum_number_of_workers: Maximum number of instances that can be assigned to this App + Service plan. + :vartype maximum_number_of_workers: int + :ivar geo_region: Geographical location for the App Service plan. + :vartype geo_region: str + :param per_site_scaling: If :code:`true`, apps assigned to this App Service plan + can be scaled independently. + If :code:`false`, apps assigned to this App Service plan will scale to all + instances of the plan. + :type per_site_scaling: bool + :param maximum_elastic_worker_count: Maximum number of total workers allowed for this + ElasticScaleEnabled App Service Plan. + :type maximum_elastic_worker_count: int + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If :code:`true`, this App Service Plan owns spot instances. + :type is_spot: bool + :param spot_expiration_time: The time when the server farm expires. Valid only if it is a spot + server farm. + :type spot_expiration_time: ~datetime.datetime + :param free_offer_expiration_time: The time when the server farm free offer expires. + :type free_offer_expiration_time: ~datetime.datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan :code:`true`, + :code:`false` otherwise. + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan :code:`true`, + :code:`false` otherwise. + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan :code:`true`, + :code:`false` otherwise. + :type hyper_v: bool + :param target_worker_count: Scaling worker count. + :type target_worker_count: int + :param target_worker_size_id: Scaling worker size ID. + :type target_worker_size_id: int + :ivar provisioning_state: Provisioning state of the App Service Plan. Possible values include: + "Succeeded", "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :param kube_environment_profile: Specification for the Kubernetes Environment to use for the + App Service plan. + :type kube_environment_profile: ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'subscription': {'readonly': True}, + 'maximum_number_of_workers': {'readonly': True}, + 'geo_region': {'readonly': True}, + 'number_of_sites': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'maximum_number_of_workers': {'key': 'properties.maximumNumberOfWorkers', 'type': 'int'}, + 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, + 'per_site_scaling': {'key': 'properties.perSiteScaling', 'type': 'bool'}, + 'maximum_elastic_worker_count': {'key': 'properties.maximumElasticWorkerCount', 'type': 'int'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'free_offer_expiration_time': {'key': 'properties.freeOfferExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, + 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, + 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + } + + def __init__( + self, + **kwargs + ): + super(AppServicePlanPatchResource, self).__init__(**kwargs) + self.worker_tier_name = kwargs.get('worker_tier_name', None) + self.status = None + self.subscription = None + self.hosting_environment_profile = kwargs.get('hosting_environment_profile', None) + self.maximum_number_of_workers = None + self.geo_region = None + self.per_site_scaling = kwargs.get('per_site_scaling', False) + self.maximum_elastic_worker_count = kwargs.get('maximum_elastic_worker_count', None) + self.number_of_sites = None + self.is_spot = kwargs.get('is_spot', None) + self.spot_expiration_time = kwargs.get('spot_expiration_time', None) + self.free_offer_expiration_time = kwargs.get('free_offer_expiration_time', None) + self.resource_group = None + self.reserved = kwargs.get('reserved', False) + self.is_xenon = kwargs.get('is_xenon', False) + self.hyper_v = kwargs.get('hyper_v', False) + self.target_worker_count = kwargs.get('target_worker_count', None) + self.target_worker_size_id = kwargs.get('target_worker_size_id', None) + self.provisioning_state = None + self.kube_environment_profile = kwargs.get('kube_environment_profile', None) + + +class ArmIdWrapper(msrest.serialization.Model): + """A wrapper for an ARM resource id. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmIdWrapper, self).__init__(**kwargs) + self.id = None + + +class AseV3NetworkingConfiguration(ProxyOnlyResource): + """Full view of networking configuration for an ASE. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar windows_outbound_ip_addresses: + :vartype windows_outbound_ip_addresses: list[str] + :ivar linux_outbound_ip_addresses: + :vartype linux_outbound_ip_addresses: list[str] + :param allow_new_private_endpoint_connections: Property to enable and disable new private + endpoint connection creation on ASE. + :type allow_new_private_endpoint_connections: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'windows_outbound_ip_addresses': {'readonly': True}, + 'linux_outbound_ip_addresses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'windows_outbound_ip_addresses': {'key': 'properties.windowsOutboundIpAddresses', 'type': '[str]'}, + 'linux_outbound_ip_addresses': {'key': 'properties.linuxOutboundIpAddresses', 'type': '[str]'}, + 'allow_new_private_endpoint_connections': {'key': 'properties.allowNewPrivateEndpointConnections', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AseV3NetworkingConfiguration, self).__init__(**kwargs) + self.windows_outbound_ip_addresses = None + self.linux_outbound_ip_addresses = None + self.allow_new_private_endpoint_connections = kwargs.get('allow_new_private_endpoint_connections', None) + + +class AuthPlatform(ProxyOnlyResource): + """AuthPlatform. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param runtime_version: + :type runtime_version: str + :param config_file_path: + :type config_file_path: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'config_file_path': {'key': 'properties.configFilePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AuthPlatform, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.runtime_version = kwargs.get('runtime_version', None) + self.config_file_path = kwargs.get('config_file_path', None) + + +class AutoHealActions(msrest.serialization.Model): + """Actions which to take by the auto-heal module when a rule is triggered. + + :param action_type: Predefined action to be taken. Possible values include: "Recycle", + "LogEvent", "CustomAction". + :type action_type: str or ~azure.mgmt.web.v2020_12_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: ~azure.mgmt.web.v2020_12_01.models.AutoHealCustomAction + :param min_process_execution_time: Minimum time the process must execute + before taking the action. + :type min_process_execution_time: str + """ + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoHealActions, self).__init__(**kwargs) + self.action_type = kwargs.get('action_type', None) + self.custom_action = kwargs.get('custom_action', None) + self.min_process_execution_time = kwargs.get('min_process_execution_time', None) + + +class AutoHealCustomAction(msrest.serialization.Model): + """Custom action to be executed +when an auto heal rule is triggered. + + :param exe: Executable to be run. + :type exe: str + :param parameters: Parameters for the executable. + :type parameters: str + """ + + _attribute_map = { + 'exe': {'key': 'exe', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = kwargs.get('exe', None) + self.parameters = kwargs.get('parameters', None) + + +class AutoHealRules(msrest.serialization.Model): + """Rules that can be defined for auto-heal. + + :param triggers: Conditions that describe when to execute the auto-heal actions. + :type triggers: ~azure.mgmt.web.v2020_12_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2020_12_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = kwargs.get('triggers', None) + self.actions = kwargs.get('actions', None) + + +class AutoHealTriggers(msrest.serialization.Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2020_12_01.models.RequestsBasedTrigger + :param private_bytes_in_kb: A rule based on private bytes. + :type private_bytes_in_kb: int + :param status_codes: A rule based on status codes. + :type status_codes: list[~azure.mgmt.web.v2020_12_01.models.StatusCodesBasedTrigger] + :param status_codes_range: A rule based on status codes ranges. + :type status_codes_range: list[~azure.mgmt.web.v2020_12_01.models.StatusCodesRangeBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: ~azure.mgmt.web.v2020_12_01.models.SlowRequestsBasedTrigger + :param slow_requests_with_path: A rule based on multiple Slow Requests Rule with path. + :type slow_requests_with_path: + list[~azure.mgmt.web.v2020_12_01.models.SlowRequestsBasedTrigger] + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'status_codes_range': {'key': 'statusCodesRange', 'type': '[StatusCodesRangeBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + 'slow_requests_with_path': {'key': 'slowRequestsWithPath', 'type': '[SlowRequestsBasedTrigger]'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = kwargs.get('requests', None) + self.private_bytes_in_kb = kwargs.get('private_bytes_in_kb', None) + self.status_codes = kwargs.get('status_codes', None) + self.status_codes_range = kwargs.get('status_codes_range', None) + self.slow_requests = kwargs.get('slow_requests', None) + self.slow_requests_with_path = kwargs.get('slow_requests_with_path', None) + + +class AzureActiveDirectory(ProxyOnlyResource): + """AzureActiveDirectory. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.AzureActiveDirectoryRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.AzureActiveDirectoryLogin + :param validation: + :type validation: ~azure.mgmt.web.v2020_12_01.models.AzureActiveDirectoryValidation + :param is_auto_provisioned: + :type is_auto_provisioned: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'AzureActiveDirectoryRegistration'}, + 'login': {'key': 'properties.login', 'type': 'AzureActiveDirectoryLogin'}, + 'validation': {'key': 'properties.validation', 'type': 'AzureActiveDirectoryValidation'}, + 'is_auto_provisioned': {'key': 'properties.isAutoProvisioned', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureActiveDirectory, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.registration = kwargs.get('registration', None) + self.login = kwargs.get('login', None) + self.validation = kwargs.get('validation', None) + self.is_auto_provisioned = kwargs.get('is_auto_provisioned', None) + + +class AzureActiveDirectoryLogin(ProxyOnlyResource): + """AzureActiveDirectoryLogin. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param disable_www_authenticate: + :type disable_www_authenticate: bool + :param login_parameters: + :type login_parameters: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'disable_www_authenticate': {'key': 'properties.disableWWWAuthenticate', 'type': 'bool'}, + 'login_parameters': {'key': 'properties.loginParameters', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureActiveDirectoryLogin, self).__init__(**kwargs) + self.disable_www_authenticate = kwargs.get('disable_www_authenticate', None) + self.login_parameters = kwargs.get('login_parameters', None) + + +class AzureActiveDirectoryRegistration(ProxyOnlyResource): + """AzureActiveDirectoryRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param open_id_issuer: + :type open_id_issuer: str + :param client_id: + :type client_id: str + :param client_secret_setting_name: + :type client_secret_setting_name: str + :param client_secret_certificate_thumbprint: + :type client_secret_certificate_thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'open_id_issuer': {'key': 'properties.openIdIssuer', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + 'client_secret_certificate_thumbprint': {'key': 'properties.clientSecretCertificateThumbprint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureActiveDirectoryRegistration, self).__init__(**kwargs) + self.open_id_issuer = kwargs.get('open_id_issuer', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret_setting_name = kwargs.get('client_secret_setting_name', None) + self.client_secret_certificate_thumbprint = kwargs.get('client_secret_certificate_thumbprint', None) + + +class AzureActiveDirectoryValidation(ProxyOnlyResource): + """AzureActiveDirectoryValidation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param jwt_claim_checks: + :type jwt_claim_checks: ~azure.mgmt.web.v2020_12_01.models.JwtClaimChecks + :param allowed_audiences: + :type allowed_audiences: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'jwt_claim_checks': {'key': 'properties.jwtClaimChecks', 'type': 'JwtClaimChecks'}, + 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureActiveDirectoryValidation, self).__init__(**kwargs) + self.jwt_claim_checks = kwargs.get('jwt_claim_checks', None) + self.allowed_audiences = kwargs.get('allowed_audiences', None) + + +class AzureBlobStorageApplicationLogsConfig(msrest.serialization.Model): + """Application logs azure blob storage configuration. + + :param level: Log level. Possible values include: "Off", "Verbose", "Information", "Warning", + "Error". + :type level: str or ~azure.mgmt.web.v2020_12_01.models.LogLevel + :param sas_url: SAS url to a azure blob container with read/write/list/delete permissions. + :type sas_url: str + :param retention_in_days: Retention in days. + Remove blobs older than X days. + 0 or lower means no retention. + :type retention_in_days: int + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'str'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = kwargs.get('level', None) + self.sas_url = kwargs.get('sas_url', None) + self.retention_in_days = kwargs.get('retention_in_days', None) + + +class AzureBlobStorageHttpLogsConfig(msrest.serialization.Model): + """Http logs to azure blob storage configuration. + + :param sas_url: SAS url to a azure blob container with read/write/list/delete permissions. + :type sas_url: str + :param retention_in_days: Retention in days. + Remove blobs older than X days. + 0 or lower means no retention. + :type retention_in_days: int + :param enabled: True if configuration is enabled, false if it is disabled and null if + configuration is not set. + :type enabled: bool + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) + self.sas_url = kwargs.get('sas_url', None) + self.retention_in_days = kwargs.get('retention_in_days', None) + self.enabled = kwargs.get('enabled', None) + + +class AzureStaticWebApps(ProxyOnlyResource): + """AzureStaticWebApps. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.AzureStaticWebAppsRegistration + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'AzureStaticWebAppsRegistration'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureStaticWebApps, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.registration = kwargs.get('registration', None) + + +class AzureStaticWebAppsRegistration(ProxyOnlyResource): + """AzureStaticWebAppsRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param client_id: + :type client_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureStaticWebAppsRegistration, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + + +class AzureStorageInfoValue(msrest.serialization.Model): + """Azure Files or Blob Storage access information value for dictionary storage. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: Type of storage. Possible values include: "AzureFiles", "AzureBlob". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.AzureStorageType + :param account_name: Name of the storage account. + :type account_name: str + :param share_name: Name of the file share (container name, for Blob storage). + :type share_name: str + :param access_key: Access key for the storage account. + :type access_key: str + :param mount_path: Path to mount the storage within the site's runtime environment. + :type mount_path: str + :ivar state: State of the storage account. Possible values include: "Ok", "InvalidCredentials", + "InvalidShare", "NotValidated". + :vartype state: str or ~azure.mgmt.web.v2020_12_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'access_key': {'key': 'accessKey', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureStorageInfoValue, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.account_name = kwargs.get('account_name', None) + self.share_name = kwargs.get('share_name', None) + self.access_key = kwargs.get('access_key', None) + self.mount_path = kwargs.get('mount_path', None) + self.state = None + + +class AzureStoragePropertyDictionaryResource(ProxyOnlyResource): + """AzureStorageInfo dictionary resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param properties: Azure storage accounts. + :type properties: dict[str, ~azure.mgmt.web.v2020_12_01.models.AzureStorageInfoValue] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{AzureStorageInfoValue}'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureStoragePropertyDictionaryResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AzureTableStorageApplicationLogsConfig(msrest.serialization.Model): + """Application logs to Azure table storage configuration. + + All required parameters must be populated in order to send to Azure. + + :param level: Log level. Possible values include: "Off", "Verbose", "Information", "Warning", + "Error". + :type level: str or ~azure.mgmt.web.v2020_12_01.models.LogLevel + :param sas_url: Required. SAS URL to an Azure table with add/query/delete permissions. + :type sas_url: str + """ + + _validation = { + 'sas_url': {'required': True}, + } + + _attribute_map = { + 'level': {'key': 'level', 'type': 'str'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureTableStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = kwargs.get('level', None) + self.sas_url = kwargs['sas_url'] + + +class BackupItem(ProxyOnlyResource): + """Backup description. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar backup_id: Id of the backup. + :vartype backup_id: int + :ivar storage_account_url: SAS URL for the storage account container which contains this + backup. + :vartype storage_account_url: str + :ivar blob_name: Name of the blob which contains data for this backup. + :vartype blob_name: str + :ivar name_properties_name: Name of this backup. + :vartype name_properties_name: str + :ivar status: Backup status. Possible values include: "InProgress", "Failed", "Succeeded", + "TimedOut", "Created", "Skipped", "PartiallySucceeded", "DeleteInProgress", "DeleteFailed", + "Deleted". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.BackupItemStatus + :ivar size_in_bytes: Size of the backup in bytes. + :vartype size_in_bytes: long + :ivar created: Timestamp of the backup creation. + :vartype created: ~datetime.datetime + :ivar log: Details regarding this backup. Might contain an error message. + :vartype log: str + :ivar databases: List of databases included in the backup. + :vartype databases: list[~azure.mgmt.web.v2020_12_01.models.DatabaseBackupSetting] + :ivar scheduled: True if this backup has been created due to a schedule being triggered. + :vartype scheduled: bool + :ivar last_restore_time_stamp: Timestamp of a last restore operation which used this backup. + :vartype last_restore_time_stamp: ~datetime.datetime + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: ~datetime.datetime + :ivar correlation_id: Unique correlation identifier. Please use this along with the timestamp + while communicating with Azure support. + :vartype correlation_id: str + :ivar website_size_in_bytes: Size of the original web app which has been backed up. + :vartype website_size_in_bytes: long + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'backup_id': {'readonly': True}, + 'storage_account_url': {'readonly': True}, + 'blob_name': {'readonly': True}, + 'name_properties_name': {'readonly': True}, + 'status': {'readonly': True}, + 'size_in_bytes': {'readonly': True}, + 'created': {'readonly': True}, + 'log': {'readonly': True}, + 'databases': {'readonly': True}, + 'scheduled': {'readonly': True}, + 'last_restore_time_stamp': {'readonly': True}, + 'finished_time_stamp': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'website_size_in_bytes': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'backup_id': {'key': 'properties.id', 'type': 'int'}, + 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, + 'blob_name': {'key': 'properties.blobName', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'log': {'key': 'properties.log', 'type': 'str'}, + 'databases': {'key': 'properties.databases', 'type': '[DatabaseBackupSetting]'}, + 'scheduled': {'key': 'properties.scheduled', 'type': 'bool'}, + 'last_restore_time_stamp': {'key': 'properties.lastRestoreTimeStamp', 'type': 'iso-8601'}, + 'finished_time_stamp': {'key': 'properties.finishedTimeStamp', 'type': 'iso-8601'}, + 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, + 'website_size_in_bytes': {'key': 'properties.websiteSizeInBytes', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupItem, self).__init__(**kwargs) + self.backup_id = None + self.storage_account_url = None + self.blob_name = None + self.name_properties_name = None + self.status = None + self.size_in_bytes = None + self.created = None + self.log = None + self.databases = None + self.scheduled = None + self.last_restore_time_stamp = None + self.finished_time_stamp = None + self.correlation_id = None + self.website_size_in_bytes = None + + +class BackupItemCollection(msrest.serialization.Model): + """Collection of backup items. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.BackupItem] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BackupItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupItemCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class BackupRequest(ProxyOnlyResource): + """Description of a backup which will be performed. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param backup_name: Name of the backup. + :type backup_name: str + :param enabled: True if the backup schedule is enabled (must be included in that case), false + if the backup schedule should be disabled. + :type enabled: bool + :param storage_account_url: SAS URL to the container. + :type storage_account_url: str + :param backup_schedule: Schedule for the backup if it is executed periodically. + :type backup_schedule: ~azure.mgmt.web.v2020_12_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: list[~azure.mgmt.web.v2020_12_01.models.DatabaseBackupSetting] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'backup_name': {'key': 'properties.backupName', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, + 'backup_schedule': {'key': 'properties.backupSchedule', 'type': 'BackupSchedule'}, + 'databases': {'key': 'properties.databases', 'type': '[DatabaseBackupSetting]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupRequest, self).__init__(**kwargs) + self.backup_name = kwargs.get('backup_name', None) + self.enabled = kwargs.get('enabled', None) + self.storage_account_url = kwargs.get('storage_account_url', None) + self.backup_schedule = kwargs.get('backup_schedule', None) + self.databases = kwargs.get('databases', None) + + +class BackupSchedule(msrest.serialization.Model): + """Description of a backup schedule. Describes how often should be the backup performed and what should be the retention policy. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param frequency_interval: Required. How often the backup should be executed (e.g. for weekly + backup, this should be set to 7 and FrequencyUnit should be set to Day). + :type frequency_interval: int + :param frequency_unit: Required. The unit of time for how often the backup should be executed + (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). + Possible values include: "Day", "Hour". Default value: "Day". + :type frequency_unit: str or ~azure.mgmt.web.v2020_12_01.models.FrequencyUnit + :param keep_at_least_one_backup: Required. True if the retention policy should always keep at + least one backup in the storage account, regardless how old it is; false otherwise. + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups should be deleted. + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: ~datetime.datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: ~datetime.datetime + """ + + _validation = { + 'frequency_interval': {'required': True}, + 'frequency_unit': {'required': True}, + 'keep_at_least_one_backup': {'required': True}, + 'retention_period_in_days': {'required': True}, + 'last_execution_time': {'readonly': True}, + } + + _attribute_map = { + 'frequency_interval': {'key': 'frequencyInterval', 'type': 'int'}, + 'frequency_unit': {'key': 'frequencyUnit', 'type': 'str'}, + 'keep_at_least_one_backup': {'key': 'keepAtLeastOneBackup', 'type': 'bool'}, + 'retention_period_in_days': {'key': 'retentionPeriodInDays', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_execution_time': {'key': 'lastExecutionTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupSchedule, self).__init__(**kwargs) + self.frequency_interval = kwargs.get('frequency_interval', 7) + self.frequency_unit = kwargs.get('frequency_unit', "Day") + self.keep_at_least_one_backup = kwargs.get('keep_at_least_one_backup', True) + self.retention_period_in_days = kwargs.get('retention_period_in_days', 30) + self.start_time = kwargs.get('start_time', None) + self.last_execution_time = None + + +class BillingMeter(ProxyOnlyResource): + """App Service billing entity that contains information about meter which the Azure billing system utilizes to charge users for services. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param meter_id: Meter GUID onboarded in Commerce. + :type meter_id: str + :param billing_location: Azure Location of billable resource. + :type billing_location: str + :param short_name: Short Name from App Service Azure pricing Page. + :type short_name: str + :param friendly_name: Friendly name of the meter. + :type friendly_name: str + :param resource_type: App Service ResourceType meter used for. + :type resource_type: str + :param os_type: App Service OS type meter used for. + :type os_type: str + :param multiplier: Meter Multiplier. + :type multiplier: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'billing_location': {'key': 'properties.billingLocation', 'type': 'str'}, + 'short_name': {'key': 'properties.shortName', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'multiplier': {'key': 'properties.multiplier', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(BillingMeter, self).__init__(**kwargs) + self.meter_id = kwargs.get('meter_id', None) + self.billing_location = kwargs.get('billing_location', None) + self.short_name = kwargs.get('short_name', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.resource_type = kwargs.get('resource_type', None) + self.os_type = kwargs.get('os_type', None) + self.multiplier = kwargs.get('multiplier', None) + + +class BillingMeterCollection(msrest.serialization.Model): + """Collection of Billing Meters. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.BillingMeter] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BillingMeter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BillingMeterCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class BlobStorageTokenStore(ProxyOnlyResource): + """BlobStorageTokenStore. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param sas_url_setting_name: + :type sas_url_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sas_url_setting_name': {'key': 'properties.sasUrlSettingName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobStorageTokenStore, self).__init__(**kwargs) + self.sas_url_setting_name = kwargs.get('sas_url_setting_name', None) + + +class Capability(msrest.serialization.Model): + """Describes the capabilities/features allowed for a specific SKU. + + :param name: Name of the SKU capability. + :type name: str + :param value: Value of the SKU capability. + :type value: str + :param reason: Reason of the SKU capability. + :type reason: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Capability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.reason = kwargs.get('reason', None) + + +class Certificate(Resource): + """SSL certificate for an app. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar friendly_name: Friendly name of the certificate. + :vartype friendly_name: str + :ivar subject_name: Subject name of the certificate. + :vartype subject_name: str + :param host_names: Host names the certificate applies to. + :type host_names: list[str] + :param pfx_blob: Pfx blob. + :type pfx_blob: bytearray + :ivar site_name: App name. + :vartype site_name: str + :ivar self_link: Self link. + :vartype self_link: str + :ivar issuer: Certificate issuer. + :vartype issuer: str + :ivar issue_date: Certificate issue Date. + :vartype issue_date: ~datetime.datetime + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: ~datetime.datetime + :param password: Certificate password. + :type password: str + :ivar thumbprint: Certificate thumbprint. + :vartype thumbprint: str + :ivar valid: Is the certificate valid?. + :vartype valid: bool + :ivar cer_blob: Raw bytes of .cer file. + :vartype cer_blob: bytearray + :ivar public_key_hash: Public key hash. + :vartype public_key_hash: str + :ivar hosting_environment_profile: Specification for the App Service Environment to use for the + certificate. + :vartype hosting_environment_profile: + ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :param key_vault_id: Key Vault Csm resource Id. + :type key_vault_id: str + :param key_vault_secret_name: Key Vault secret name. + :type key_vault_secret_name: str + :ivar key_vault_secret_status: Status of the Key Vault secret. Possible values include: + "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", + "Unknown". + :vartype key_vault_secret_status: str or + ~azure.mgmt.web.v2020_12_01.models.KeyVaultSecretStatus + :param server_farm_id: Resource ID of the associated App Service plan, formatted as: + "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + :type server_farm_id: str + :param canonical_name: CNAME of the certificate to be issued via free certificate. + :type canonical_name: str + :param domain_validation_method: Method of domain validation for free cert. + :type domain_validation_method: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'site_name': {'readonly': True}, + 'self_link': {'readonly': True}, + 'issuer': {'readonly': True}, + 'issue_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'valid': {'readonly': True}, + 'cer_blob': {'readonly': True}, + 'public_key_hash': {'readonly': True}, + 'hosting_environment_profile': {'readonly': True}, + 'key_vault_secret_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'subject_name': {'key': 'properties.subjectName', 'type': 'str'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + 'pfx_blob': {'key': 'properties.pfxBlob', 'type': 'bytearray'}, + 'site_name': {'key': 'properties.siteName', 'type': 'str'}, + 'self_link': {'key': 'properties.selfLink', 'type': 'str'}, + 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'issue_date': {'key': 'properties.issueDate', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'valid': {'key': 'properties.valid', 'type': 'bool'}, + 'cer_blob': {'key': 'properties.cerBlob', 'type': 'bytearray'}, + 'public_key_hash': {'key': 'properties.publicKeyHash', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'key_vault_secret_status': {'key': 'properties.keyVaultSecretStatus', 'type': 'str'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, + 'domain_validation_method': {'key': 'properties.domainValidationMethod', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Certificate, self).__init__(**kwargs) + self.friendly_name = None + self.subject_name = None + self.host_names = kwargs.get('host_names', None) + self.pfx_blob = kwargs.get('pfx_blob', None) + self.site_name = None + self.self_link = None + self.issuer = None + self.issue_date = None + self.expiration_date = None + self.password = kwargs.get('password', None) + self.thumbprint = None + self.valid = None + self.cer_blob = None + self.public_key_hash = None + self.hosting_environment_profile = None + self.key_vault_id = kwargs.get('key_vault_id', None) + self.key_vault_secret_name = kwargs.get('key_vault_secret_name', None) + self.key_vault_secret_status = None + self.server_farm_id = kwargs.get('server_farm_id', None) + self.canonical_name = kwargs.get('canonical_name', None) + self.domain_validation_method = kwargs.get('domain_validation_method', None) + + +class CertificateCollection(msrest.serialization.Model): + """Collection of certificates. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Certificate] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Certificate]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CertificateCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class CertificateDetails(msrest.serialization.Model): + """SSL certificate details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar version: Certificate Version. + :vartype version: int + :ivar serial_number: Certificate Serial Number. + :vartype serial_number: str + :ivar thumbprint: Certificate Thumbprint. + :vartype thumbprint: str + :ivar subject: Certificate Subject. + :vartype subject: str + :ivar not_before: Date Certificate is valid from. + :vartype not_before: ~datetime.datetime + :ivar not_after: Date Certificate is valid to. + :vartype not_after: ~datetime.datetime + :ivar signature_algorithm: Certificate Signature algorithm. + :vartype signature_algorithm: str + :ivar issuer: Certificate Issuer. + :vartype issuer: str + :ivar raw_data: Raw certificate data. + :vartype raw_data: str + """ + + _validation = { + 'version': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'subject': {'readonly': True}, + 'not_before': {'readonly': True}, + 'not_after': {'readonly': True}, + 'signature_algorithm': {'readonly': True}, + 'issuer': {'readonly': True}, + 'raw_data': {'readonly': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'int'}, + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'not_before': {'key': 'notBefore', 'type': 'iso-8601'}, + 'not_after': {'key': 'notAfter', 'type': 'iso-8601'}, + 'signature_algorithm': {'key': 'signatureAlgorithm', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'raw_data': {'key': 'rawData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CertificateDetails, self).__init__(**kwargs) + self.version = None + self.serial_number = None + self.thumbprint = None + self.subject = None + self.not_before = None + self.not_after = None + self.signature_algorithm = None + self.issuer = None + self.raw_data = None + + +class CertificateEmail(ProxyOnlyResource): + """SSL certificate email. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param email_id: Email id. + :type email_id: str + :param time_stamp: Time stamp. + :type time_stamp: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'email_id': {'key': 'properties.emailId', 'type': 'str'}, + 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(CertificateEmail, self).__init__(**kwargs) + self.email_id = kwargs.get('email_id', None) + self.time_stamp = kwargs.get('time_stamp', None) + + +class CertificateOrderAction(ProxyOnlyResource): + """Certificate order action. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar action_type: Action type. Possible values include: "CertificateIssued", + "CertificateOrderCanceled", "CertificateOrderCreated", "CertificateRevoked", + "DomainValidationComplete", "FraudDetected", "OrgNameChange", "OrgValidationComplete", + "SanDrop", "FraudCleared", "CertificateExpired", "CertificateExpirationWarning", + "FraudDocumentationRequired", "Unknown". + :vartype action_type: str or ~azure.mgmt.web.v2020_12_01.models.CertificateOrderActionType + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action_type': {'readonly': True}, + 'created_at': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_type': {'key': 'properties.actionType', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(CertificateOrderAction, self).__init__(**kwargs) + self.action_type = None + self.created_at = None + + +class CertificateOrderContact(msrest.serialization.Model): + """CertificateOrderContact. + + :param email: + :type email: str + :param name_first: + :type name_first: str + :param name_last: + :type name_last: str + :param phone: + :type phone: str + """ + + _attribute_map = { + 'email': {'key': 'email', 'type': 'str'}, + 'name_first': {'key': 'nameFirst', 'type': 'str'}, + 'name_last': {'key': 'nameLast', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CertificateOrderContact, self).__init__(**kwargs) + self.email = kwargs.get('email', None) + self.name_first = kwargs.get('name_first', None) + self.name_last = kwargs.get('name_last', None) + self.phone = kwargs.get('phone', None) + + +class CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar friendly_name: Friendly name of the certificate. + :vartype friendly_name: str + :ivar subject_name: Subject name of the certificate. + :vartype subject_name: str + :param host_names: Host names the certificate applies to. + :type host_names: list[str] + :param pfx_blob: Pfx blob. + :type pfx_blob: bytearray + :ivar site_name: App name. + :vartype site_name: str + :ivar self_link: Self link. + :vartype self_link: str + :ivar issuer: Certificate issuer. + :vartype issuer: str + :ivar issue_date: Certificate issue Date. + :vartype issue_date: ~datetime.datetime + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: ~datetime.datetime + :param password: Certificate password. + :type password: str + :ivar thumbprint: Certificate thumbprint. + :vartype thumbprint: str + :ivar valid: Is the certificate valid?. + :vartype valid: bool + :ivar cer_blob: Raw bytes of .cer file. + :vartype cer_blob: bytearray + :ivar public_key_hash: Public key hash. + :vartype public_key_hash: str + :ivar hosting_environment_profile: Specification for the App Service Environment to use for the + certificate. + :vartype hosting_environment_profile: + ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :param key_vault_id: Key Vault Csm resource Id. + :type key_vault_id: str + :param key_vault_secret_name: Key Vault secret name. + :type key_vault_secret_name: str + :ivar key_vault_secret_status: Status of the Key Vault secret. Possible values include: + "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", + "Unknown". + :vartype key_vault_secret_status: str or + ~azure.mgmt.web.v2020_12_01.models.KeyVaultSecretStatus + :param server_farm_id: Resource ID of the associated App Service plan, formatted as: + "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + :type server_farm_id: str + :param canonical_name: CNAME of the certificate to be issued via free certificate. + :type canonical_name: str + :param domain_validation_method: Method of domain validation for free cert. + :type domain_validation_method: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'site_name': {'readonly': True}, + 'self_link': {'readonly': True}, + 'issuer': {'readonly': True}, + 'issue_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'valid': {'readonly': True}, + 'cer_blob': {'readonly': True}, + 'public_key_hash': {'readonly': True}, + 'hosting_environment_profile': {'readonly': True}, + 'key_vault_secret_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'subject_name': {'key': 'properties.subjectName', 'type': 'str'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + 'pfx_blob': {'key': 'properties.pfxBlob', 'type': 'bytearray'}, + 'site_name': {'key': 'properties.siteName', 'type': 'str'}, + 'self_link': {'key': 'properties.selfLink', 'type': 'str'}, + 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'issue_date': {'key': 'properties.issueDate', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'valid': {'key': 'properties.valid', 'type': 'bool'}, + 'cer_blob': {'key': 'properties.cerBlob', 'type': 'bytearray'}, + 'public_key_hash': {'key': 'properties.publicKeyHash', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'key_vault_secret_status': {'key': 'properties.keyVaultSecretStatus', 'type': 'str'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, + 'domain_validation_method': {'key': 'properties.domainValidationMethod', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CertificatePatchResource, self).__init__(**kwargs) + self.friendly_name = None + self.subject_name = None + self.host_names = kwargs.get('host_names', None) + self.pfx_blob = kwargs.get('pfx_blob', None) + self.site_name = None + self.self_link = None + self.issuer = None + self.issue_date = None + self.expiration_date = None + self.password = kwargs.get('password', None) + self.thumbprint = None + self.valid = None + self.cer_blob = None + self.public_key_hash = None + self.hosting_environment_profile = None + self.key_vault_id = kwargs.get('key_vault_id', None) + self.key_vault_secret_name = kwargs.get('key_vault_secret_name', None) + self.key_vault_secret_status = None + self.server_farm_id = kwargs.get('server_farm_id', None) + self.canonical_name = kwargs.get('canonical_name', None) + self.domain_validation_method = kwargs.get('domain_validation_method', None) + + +class ClientRegistration(ProxyOnlyResource): + """ClientRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param client_id: + :type client_id: str + :param client_secret_setting_name: + :type client_secret_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientRegistration, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_secret_setting_name = kwargs.get('client_secret_setting_name', None) + + +class CloningInfo(msrest.serialization.Model): + """Information needed for cloning operation. + + All required parameters must be populated in order to send to Azure. + + :param correlation_id: Correlation ID of cloning operation. This ID ties multiple cloning + operations + together to use the same snapshot. + :type correlation_id: str + :param overwrite: :code:`true` to overwrite destination app; otherwise, + :code:`false`. + :type overwrite: bool + :param clone_custom_host_names: :code:`true` to clone custom hostnames from source + app; otherwise, :code:`false`. + :type clone_custom_host_names: bool + :param clone_source_control: :code:`true` to clone source control from source app; + otherwise, :code:`false`. + :type clone_source_control: bool + :param source_web_app_id: Required. ARM resource ID of the source app. App resource ID is of + the form + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + for production slots and + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + for other slots. + :type source_web_app_id: str + :param source_web_app_location: Location of source app ex: West US or North Europe. + :type source_web_app_location: str + :param hosting_environment: App Service Environment. + :type hosting_environment: str + :param app_settings_overrides: Application setting overrides for cloned app. If specified, + these settings override the settings cloned + from source app. Otherwise, application settings from source app are retained. + :type app_settings_overrides: dict[str, str] + :param configure_load_balancing: :code:`true` to configure load balancing for + source and destination app. + :type configure_load_balancing: bool + :param traffic_manager_profile_id: ARM resource ID of the Traffic Manager profile to use, if it + exists. Traffic Manager resource ID is of the form + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}. + :type traffic_manager_profile_id: str + :param traffic_manager_profile_name: Name of Traffic Manager profile to create. This is only + needed if Traffic Manager profile does not already exist. + :type traffic_manager_profile_name: str + """ + + _validation = { + 'source_web_app_id': {'required': True}, + } + + _attribute_map = { + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'overwrite': {'key': 'overwrite', 'type': 'bool'}, + 'clone_custom_host_names': {'key': 'cloneCustomHostNames', 'type': 'bool'}, + 'clone_source_control': {'key': 'cloneSourceControl', 'type': 'bool'}, + 'source_web_app_id': {'key': 'sourceWebAppId', 'type': 'str'}, + 'source_web_app_location': {'key': 'sourceWebAppLocation', 'type': 'str'}, + 'hosting_environment': {'key': 'hostingEnvironment', 'type': 'str'}, + 'app_settings_overrides': {'key': 'appSettingsOverrides', 'type': '{str}'}, + 'configure_load_balancing': {'key': 'configureLoadBalancing', 'type': 'bool'}, + 'traffic_manager_profile_id': {'key': 'trafficManagerProfileId', 'type': 'str'}, + 'traffic_manager_profile_name': {'key': 'trafficManagerProfileName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CloningInfo, self).__init__(**kwargs) + self.correlation_id = kwargs.get('correlation_id', None) + self.overwrite = kwargs.get('overwrite', None) + self.clone_custom_host_names = kwargs.get('clone_custom_host_names', None) + self.clone_source_control = kwargs.get('clone_source_control', None) + self.source_web_app_id = kwargs['source_web_app_id'] + self.source_web_app_location = kwargs.get('source_web_app_location', None) + self.hosting_environment = kwargs.get('hosting_environment', None) + self.app_settings_overrides = kwargs.get('app_settings_overrides', None) + self.configure_load_balancing = kwargs.get('configure_load_balancing', None) + self.traffic_manager_profile_id = kwargs.get('traffic_manager_profile_id', None) + self.traffic_manager_profile_name = kwargs.get('traffic_manager_profile_name', None) + + +class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: Principal Id of user assigned identity. + :vartype principal_id: str + :ivar client_id: Client Id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class ConnectionStringDictionary(ProxyOnlyResource): + """String dictionary resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param properties: Connection strings. + :type properties: dict[str, ~azure.mgmt.web.v2020_12_01.models.ConnStringValueTypePair] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{ConnStringValueTypePair}'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionStringDictionary, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ConnStringInfo(msrest.serialization.Model): + """Database connection string information. + + :param name: Name of connection string. + :type name: str + :param connection_string: Connection string value. + :type connection_string: str + :param type: Type of database. Possible values include: "MySql", "SQLServer", "SQLAzure", + "Custom", "NotificationHub", "ServiceBus", "EventHub", "ApiHub", "DocDb", "RedisCache", + "PostgreSQL". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnStringInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.connection_string = kwargs.get('connection_string', None) + self.type = kwargs.get('type', None) + + +class ConnStringValueTypePair(msrest.serialization.Model): + """Database connection string value to type pair. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Value of pair. + :type value: str + :param type: Required. Type of database. Possible values include: "MySql", "SQLServer", + "SQLAzure", "Custom", "NotificationHub", "ServiceBus", "EventHub", "ApiHub", "DocDb", + "RedisCache", "PostgreSQL". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = kwargs['value'] + self.type = kwargs['type'] + + +class Contact(msrest.serialization.Model): + """Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois +directories as per ICANN requirements. + + All required parameters must be populated in order to send to Azure. + + :param address_mailing: Mailing address. + :type address_mailing: ~azure.mgmt.web.v2020_12_01.models.Address + :param email: Required. Email address. + :type email: str + :param fax: Fax number. + :type fax: str + :param job_title: Job title. + :type job_title: str + :param name_first: Required. First name. + :type name_first: str + :param name_last: Required. Last name. + :type name_last: str + :param name_middle: Middle name. + :type name_middle: str + :param organization: Organization contact belongs to. + :type organization: str + :param phone: Required. Phone number. + :type phone: str + """ + + _validation = { + 'email': {'required': True}, + 'name_first': {'required': True}, + 'name_last': {'required': True}, + 'phone': {'required': True}, + } + + _attribute_map = { + 'address_mailing': {'key': 'addressMailing', 'type': 'Address'}, + 'email': {'key': 'email', 'type': 'str'}, + 'fax': {'key': 'fax', 'type': 'str'}, + 'job_title': {'key': 'jobTitle', 'type': 'str'}, + 'name_first': {'key': 'nameFirst', 'type': 'str'}, + 'name_last': {'key': 'nameLast', 'type': 'str'}, + 'name_middle': {'key': 'nameMiddle', 'type': 'str'}, + 'organization': {'key': 'organization', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Contact, self).__init__(**kwargs) + self.address_mailing = kwargs.get('address_mailing', None) + self.email = kwargs['email'] + self.fax = kwargs.get('fax', None) + self.job_title = kwargs.get('job_title', None) + self.name_first = kwargs['name_first'] + self.name_last = kwargs['name_last'] + self.name_middle = kwargs.get('name_middle', None) + self.organization = kwargs.get('organization', None) + self.phone = kwargs['phone'] + + +class ContainerCpuStatistics(msrest.serialization.Model): + """ContainerCpuStatistics. + + :param cpu_usage: + :type cpu_usage: ~azure.mgmt.web.v2020_12_01.models.ContainerCpuUsage + :param system_cpu_usage: + :type system_cpu_usage: long + :param online_cpu_count: + :type online_cpu_count: int + :param throttling_data: + :type throttling_data: ~azure.mgmt.web.v2020_12_01.models.ContainerThrottlingData + """ + + _attribute_map = { + 'cpu_usage': {'key': 'cpuUsage', 'type': 'ContainerCpuUsage'}, + 'system_cpu_usage': {'key': 'systemCpuUsage', 'type': 'long'}, + 'online_cpu_count': {'key': 'onlineCpuCount', 'type': 'int'}, + 'throttling_data': {'key': 'throttlingData', 'type': 'ContainerThrottlingData'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerCpuStatistics, self).__init__(**kwargs) + self.cpu_usage = kwargs.get('cpu_usage', None) + self.system_cpu_usage = kwargs.get('system_cpu_usage', None) + self.online_cpu_count = kwargs.get('online_cpu_count', None) + self.throttling_data = kwargs.get('throttling_data', None) + + +class ContainerCpuUsage(msrest.serialization.Model): + """ContainerCpuUsage. + + :param total_usage: + :type total_usage: long + :param per_cpu_usage: + :type per_cpu_usage: list[long] + :param kernel_mode_usage: + :type kernel_mode_usage: long + :param user_mode_usage: + :type user_mode_usage: long + """ + + _attribute_map = { + 'total_usage': {'key': 'totalUsage', 'type': 'long'}, + 'per_cpu_usage': {'key': 'perCpuUsage', 'type': '[long]'}, + 'kernel_mode_usage': {'key': 'kernelModeUsage', 'type': 'long'}, + 'user_mode_usage': {'key': 'userModeUsage', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerCpuUsage, self).__init__(**kwargs) + self.total_usage = kwargs.get('total_usage', None) + self.per_cpu_usage = kwargs.get('per_cpu_usage', None) + self.kernel_mode_usage = kwargs.get('kernel_mode_usage', None) + self.user_mode_usage = kwargs.get('user_mode_usage', None) + + +class ContainerInfo(msrest.serialization.Model): + """ContainerInfo. + + :param current_time_stamp: + :type current_time_stamp: ~datetime.datetime + :param previous_time_stamp: + :type previous_time_stamp: ~datetime.datetime + :param current_cpu_stats: + :type current_cpu_stats: ~azure.mgmt.web.v2020_12_01.models.ContainerCpuStatistics + :param previous_cpu_stats: + :type previous_cpu_stats: ~azure.mgmt.web.v2020_12_01.models.ContainerCpuStatistics + :param memory_stats: + :type memory_stats: ~azure.mgmt.web.v2020_12_01.models.ContainerMemoryStatistics + :param name: + :type name: str + :param id: + :type id: str + :param eth0: + :type eth0: ~azure.mgmt.web.v2020_12_01.models.ContainerNetworkInterfaceStatistics + """ + + _attribute_map = { + 'current_time_stamp': {'key': 'currentTimeStamp', 'type': 'iso-8601'}, + 'previous_time_stamp': {'key': 'previousTimeStamp', 'type': 'iso-8601'}, + 'current_cpu_stats': {'key': 'currentCpuStats', 'type': 'ContainerCpuStatistics'}, + 'previous_cpu_stats': {'key': 'previousCpuStats', 'type': 'ContainerCpuStatistics'}, + 'memory_stats': {'key': 'memoryStats', 'type': 'ContainerMemoryStatistics'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'eth0': {'key': 'eth0', 'type': 'ContainerNetworkInterfaceStatistics'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerInfo, self).__init__(**kwargs) + self.current_time_stamp = kwargs.get('current_time_stamp', None) + self.previous_time_stamp = kwargs.get('previous_time_stamp', None) + self.current_cpu_stats = kwargs.get('current_cpu_stats', None) + self.previous_cpu_stats = kwargs.get('previous_cpu_stats', None) + self.memory_stats = kwargs.get('memory_stats', None) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.eth0 = kwargs.get('eth0', None) + + +class ContainerMemoryStatistics(msrest.serialization.Model): + """ContainerMemoryStatistics. + + :param usage: + :type usage: long + :param max_usage: + :type max_usage: long + :param limit: + :type limit: long + """ + + _attribute_map = { + 'usage': {'key': 'usage', 'type': 'long'}, + 'max_usage': {'key': 'maxUsage', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerMemoryStatistics, self).__init__(**kwargs) + self.usage = kwargs.get('usage', None) + self.max_usage = kwargs.get('max_usage', None) + self.limit = kwargs.get('limit', None) + + +class ContainerNetworkInterfaceStatistics(msrest.serialization.Model): + """ContainerNetworkInterfaceStatistics. + + :param rx_bytes: + :type rx_bytes: long + :param rx_packets: + :type rx_packets: long + :param rx_errors: + :type rx_errors: long + :param rx_dropped: + :type rx_dropped: long + :param tx_bytes: + :type tx_bytes: long + :param tx_packets: + :type tx_packets: long + :param tx_errors: + :type tx_errors: long + :param tx_dropped: + :type tx_dropped: long + """ + + _attribute_map = { + 'rx_bytes': {'key': 'rxBytes', 'type': 'long'}, + 'rx_packets': {'key': 'rxPackets', 'type': 'long'}, + 'rx_errors': {'key': 'rxErrors', 'type': 'long'}, + 'rx_dropped': {'key': 'rxDropped', 'type': 'long'}, + 'tx_bytes': {'key': 'txBytes', 'type': 'long'}, + 'tx_packets': {'key': 'txPackets', 'type': 'long'}, + 'tx_errors': {'key': 'txErrors', 'type': 'long'}, + 'tx_dropped': {'key': 'txDropped', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerNetworkInterfaceStatistics, self).__init__(**kwargs) + self.rx_bytes = kwargs.get('rx_bytes', None) + self.rx_packets = kwargs.get('rx_packets', None) + self.rx_errors = kwargs.get('rx_errors', None) + self.rx_dropped = kwargs.get('rx_dropped', None) + self.tx_bytes = kwargs.get('tx_bytes', None) + self.tx_packets = kwargs.get('tx_packets', None) + self.tx_errors = kwargs.get('tx_errors', None) + self.tx_dropped = kwargs.get('tx_dropped', None) + + +class ContainerThrottlingData(msrest.serialization.Model): + """ContainerThrottlingData. + + :param periods: + :type periods: int + :param throttled_periods: + :type throttled_periods: int + :param throttled_time: + :type throttled_time: int + """ + + _attribute_map = { + 'periods': {'key': 'periods', 'type': 'int'}, + 'throttled_periods': {'key': 'throttledPeriods', 'type': 'int'}, + 'throttled_time': {'key': 'throttledTime', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerThrottlingData, self).__init__(**kwargs) + self.periods = kwargs.get('periods', None) + self.throttled_periods = kwargs.get('throttled_periods', None) + self.throttled_time = kwargs.get('throttled_time', None) + + +class ContinuousWebJob(ProxyOnlyResource): + """Continuous Web Job Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param status: Job status. Possible values include: "Initializing", "Starting", "Running", + "PendingRestart", "Stopped". + :type status: str or ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobStatus + :param detailed_status: Detailed status. + :type detailed_status: str + :param log_url: Log URL. + :type log_url: str + :param run_command: Run command. + :type run_command: str + :param url: Job URL. + :type url: str + :param extra_info_url: Extra Info URL. + :type extra_info_url: str + :param web_job_type: Job type. Possible values include: "Continuous", "Triggered". + :type web_job_type: str or ~azure.mgmt.web.v2020_12_01.models.WebJobType + :param error: Error information. + :type error: str + :param using_sdk: Using SDK?. + :type using_sdk: bool + :param settings: Job settings. + :type settings: dict[str, object] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'detailed_status': {'key': 'properties.detailed_status', 'type': 'str'}, + 'log_url': {'key': 'properties.log_url', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + super(ContinuousWebJob, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.detailed_status = kwargs.get('detailed_status', None) + self.log_url = kwargs.get('log_url', None) + self.run_command = kwargs.get('run_command', None) + self.url = kwargs.get('url', None) + self.extra_info_url = kwargs.get('extra_info_url', None) + self.web_job_type = kwargs.get('web_job_type', None) + self.error = kwargs.get('error', None) + self.using_sdk = kwargs.get('using_sdk', None) + self.settings = kwargs.get('settings', None) + + +class ContinuousWebJobCollection(msrest.serialization.Model): + """Collection of Kudu continuous web job information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ContinuousWebJob]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContinuousWebJobCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class CookieExpiration(ProxyOnlyResource): + """CookieExpiration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param convention: Possible values include: "FixedTime", "IdentityProviderDerived". + :type convention: str or ~azure.mgmt.web.v2020_12_01.models.CookieExpirationConvention + :param time_to_expiration: + :type time_to_expiration: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'convention': {'key': 'properties.convention', 'type': 'str'}, + 'time_to_expiration': {'key': 'properties.timeToExpiration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CookieExpiration, self).__init__(**kwargs) + self.convention = kwargs.get('convention', None) + self.time_to_expiration = kwargs.get('time_to_expiration', None) + + +class CorsSettings(msrest.serialization.Model): + """Cross-Origin Resource Sharing (CORS) settings for the app. + + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin + calls (for example: http://example.com:12345). Use "*" to allow all. + :type allowed_origins: list[str] + :param support_credentials: Gets or sets whether CORS requests with credentials are allowed. + See + https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials + for more details. + :type support_credentials: bool + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + 'support_credentials': {'key': 'supportCredentials', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = kwargs.get('allowed_origins', None) + self.support_credentials = kwargs.get('support_credentials', None) + + +class CsmMoveResourceEnvelope(msrest.serialization.Model): + """Object with a list of the resources that need to be moved and the resource group they should be moved to. + + :param target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + """ + + _validation = { + 'target_resource_group': {'max_length': 90, 'min_length': 1, 'pattern': r' ^[-\w\._\(\)]+[^\.]$'}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmMoveResourceEnvelope, self).__init__(**kwargs) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.resources = kwargs.get('resources', None) + + +class CsmOperationCollection(msrest.serialization.Model): + """Collection of Azure resource manager operation metadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.CsmOperationDescription] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CsmOperationDescription]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmOperationCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class CsmOperationDescription(msrest.serialization.Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: Meta data about operation used for display in portal. + :type display: ~azure.mgmt.web.v2020_12_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: Properties available for a Microsoft.Web resource provider operation. + :type properties: ~azure.mgmt.web.v2020_12_01.models.CsmOperationDescriptionProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'CsmOperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CsmOperationDescriptionProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmOperationDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class CsmOperationDescriptionProperties(msrest.serialization.Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: Resource metrics service provided by Microsoft.Insights resource + provider. + :type service_specification: ~azure.mgmt.web.v2020_12_01.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmOperationDescriptionProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + +class CsmOperationDisplay(msrest.serialization.Model): + """Meta data about operation used for display in portal. + + :param provider: + :type provider: str + :param resource: + :type resource: str + :param operation: + :type operation: str + :param description: + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmOperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class CsmPublishingCredentialsPoliciesCollection(ProxyOnlyResource): + """Publishing Credentials Policies collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param ftp: Whether FTP is allowed. + :type ftp: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :param scm: Whether Scm Basic Auth is allowed. + :type scm: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ftp': {'key': 'properties.ftp', 'type': 'CsmPublishingCredentialsPoliciesEntity'}, + 'scm': {'key': 'properties.scm', 'type': 'CsmPublishingCredentialsPoliciesEntity'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmPublishingCredentialsPoliciesCollection, self).__init__(**kwargs) + self.ftp = kwargs.get('ftp', None) + self.scm = kwargs.get('scm', None) + + +class CsmPublishingCredentialsPoliciesEntity(ProxyOnlyResource): + """Publishing Credentials Policies parameters. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param allow: :code:`true` to allow access to a publishing method; otherwise, + :code:`false`. + :type allow: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allow': {'key': 'properties.allow', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmPublishingCredentialsPoliciesEntity, self).__init__(**kwargs) + self.allow = kwargs.get('allow', None) + + +class CsmPublishingProfileOptions(msrest.serialization.Model): + """Publishing options for requested profile. + + :param format: Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: "FileZilla3", "WebDeploy", "Ftp". + :type format: str or ~azure.mgmt.web.v2020_12_01.models.PublishingProfileFormat + :param include_disaster_recovery_endpoints: Include the DisasterRecover endpoint if true. + :type include_disaster_recovery_endpoints: bool + """ + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + 'include_disaster_recovery_endpoints': {'key': 'includeDisasterRecoveryEndpoints', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmPublishingProfileOptions, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + self.include_disaster_recovery_endpoints = kwargs.get('include_disaster_recovery_endpoints', None) + + +class CsmSlotEntity(msrest.serialization.Model): + """Deployment slot parameters. + + All required parameters must be populated in order to send to Azure. + + :param target_slot: Required. Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: Required. :code:`true` to preserve Virtual Network to the + slot during swap; otherwise, :code:`false`. + :type preserve_vnet: bool + """ + + _validation = { + 'target_slot': {'required': True}, + 'preserve_vnet': {'required': True}, + } + + _attribute_map = { + 'target_slot': {'key': 'targetSlot', 'type': 'str'}, + 'preserve_vnet': {'key': 'preserveVnet', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmSlotEntity, self).__init__(**kwargs) + self.target_slot = kwargs['target_slot'] + self.preserve_vnet = kwargs['preserve_vnet'] + + +class CsmUsageQuota(msrest.serialization.Model): + """Usage of the quota resource. + + :param unit: Units of measurement for the quota resource. + :type unit: str + :param next_reset_time: Next reset time for the resource counter. + :type next_reset_time: ~datetime.datetime + :param current_value: The current value of the resource counter. + :type current_value: long + :param limit: The resource limit. + :type limit: long + :param name: Quota name. + :type name: ~azure.mgmt.web.v2020_12_01.models.LocalizableString + """ + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmUsageQuota, self).__init__(**kwargs) + self.unit = kwargs.get('unit', None) + self.next_reset_time = kwargs.get('next_reset_time', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class CsmUsageQuotaCollection(msrest.serialization.Model): + """Collection of CSM usage quotas. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuota] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CsmUsageQuota]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CsmUsageQuotaCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class CustomHostnameAnalysisResult(ProxyOnlyResource): + """Custom domain analysis. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar is_hostname_already_verified: :code:`true` if hostname is already verified; + otherwise, :code:`false`. + :vartype is_hostname_already_verified: bool + :ivar custom_domain_verification_test: DNS verification test result. Possible values include: + "Passed", "Failed", "Skipped". + :vartype custom_domain_verification_test: str or + ~azure.mgmt.web.v2020_12_01.models.DnsVerificationTestResult + :ivar custom_domain_verification_failure_info: Raw failure information if DNS verification + fails. + :vartype custom_domain_verification_failure_info: + ~azure.mgmt.web.v2020_12_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: :code:`true` if there is a conflict on a scale + unit; otherwise, :code:`false`. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: :code:`true` if there is a conflict across + subscriptions; otherwise, :code:`false`. + :vartype has_conflict_across_subscription: bool + :ivar conflicting_app_resource_id: Name of the conflicting app on scale unit if it's within the + same subscription. + :vartype conflicting_app_resource_id: str + :param c_name_records: CName records controller can see for this hostname. + :type c_name_records: list[str] + :param txt_records: TXT records controller can see for this hostname. + :type txt_records: list[str] + :param a_records: A records controller can see for this hostname. + :type a_records: list[str] + :param alternate_c_name_records: Alternate CName records controller can see for this hostname. + :type alternate_c_name_records: list[str] + :param alternate_txt_records: Alternate TXT records controller can see for this hostname. + :type alternate_txt_records: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_hostname_already_verified': {'readonly': True}, + 'custom_domain_verification_test': {'readonly': True}, + 'custom_domain_verification_failure_info': {'readonly': True}, + 'has_conflict_on_scale_unit': {'readonly': True}, + 'has_conflict_across_subscription': {'readonly': True}, + 'conflicting_app_resource_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_hostname_already_verified': {'key': 'properties.isHostnameAlreadyVerified', 'type': 'bool'}, + 'custom_domain_verification_test': {'key': 'properties.customDomainVerificationTest', 'type': 'str'}, + 'custom_domain_verification_failure_info': {'key': 'properties.customDomainVerificationFailureInfo', 'type': 'ErrorEntity'}, + 'has_conflict_on_scale_unit': {'key': 'properties.hasConflictOnScaleUnit', 'type': 'bool'}, + 'has_conflict_across_subscription': {'key': 'properties.hasConflictAcrossSubscription', 'type': 'bool'}, + 'conflicting_app_resource_id': {'key': 'properties.conflictingAppResourceId', 'type': 'str'}, + 'c_name_records': {'key': 'properties.cNameRecords', 'type': '[str]'}, + 'txt_records': {'key': 'properties.txtRecords', 'type': '[str]'}, + 'a_records': {'key': 'properties.aRecords', 'type': '[str]'}, + 'alternate_c_name_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, + 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomHostnameAnalysisResult, self).__init__(**kwargs) + self.is_hostname_already_verified = None + self.custom_domain_verification_test = None + self.custom_domain_verification_failure_info = None + self.has_conflict_on_scale_unit = None + self.has_conflict_across_subscription = None + self.conflicting_app_resource_id = None + self.c_name_records = kwargs.get('c_name_records', None) + self.txt_records = kwargs.get('txt_records', None) + self.a_records = kwargs.get('a_records', None) + self.alternate_c_name_records = kwargs.get('alternate_c_name_records', None) + self.alternate_txt_records = kwargs.get('alternate_txt_records', None) + + +class CustomOpenIdConnectProvider(ProxyOnlyResource): + """CustomOpenIdConnectProvider. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.OpenIdConnectRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.OpenIdConnectLogin + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'OpenIdConnectRegistration'}, + 'login': {'key': 'properties.login', 'type': 'OpenIdConnectLogin'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomOpenIdConnectProvider, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.registration = kwargs.get('registration', None) + self.login = kwargs.get('login', None) + + +class DatabaseBackupSetting(msrest.serialization.Model): + """Database backup settings. + + All required parameters must be populated in order to send to Azure. + + :param database_type: Required. Database type (e.g. SqlAzure / MySql). Possible values include: + "SqlAzure", "MySql", "LocalMySql", "PostgreSql". + :type database_type: str or ~azure.mgmt.web.v2020_12_01.models.DatabaseType + :param name: + :type name: str + :param connection_string_name: Contains a connection string name that is linked to the + SiteConfig.ConnectionStrings. + This is used during restore with overwrite connection strings options. + :type connection_string_name: str + :param connection_string: Contains a connection string to a database which is being backed up + or restored. If the restore should happen to a new database, the database name inside is the + new one. + :type connection_string: str + """ + + _validation = { + 'database_type': {'required': True}, + } + + _attribute_map = { + 'database_type': {'key': 'databaseType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string_name': {'key': 'connectionStringName', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseBackupSetting, self).__init__(**kwargs) + self.database_type = kwargs['database_type'] + self.name = kwargs.get('name', None) + self.connection_string_name = kwargs.get('connection_string_name', None) + self.connection_string = kwargs.get('connection_string', None) + + +class DataProviderMetadata(msrest.serialization.Model): + """Additional configuration for a data providers. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param provider_name: + :type provider_name: str + :ivar property_bag: Settings for the data provider. + :vartype property_bag: list[~azure.mgmt.web.v2020_12_01.models.KeyValuePairStringObject] + """ + + _validation = { + 'property_bag': {'readonly': True}, + } + + _attribute_map = { + 'provider_name': {'key': 'providerName', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '[KeyValuePairStringObject]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataProviderMetadata, self).__init__(**kwargs) + self.provider_name = kwargs.get('provider_name', None) + self.property_bag = None + + +class DataSource(msrest.serialization.Model): + """Class representing data source used by the detectors. + + :param instructions: Instructions if any for the data source. + :type instructions: list[str] + :param data_source_uri: Datasource Uri Links. + :type data_source_uri: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + """ + + _attribute_map = { + 'instructions': {'key': 'instructions', 'type': '[str]'}, + 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataSource, self).__init__(**kwargs) + self.instructions = kwargs.get('instructions', None) + self.data_source_uri = kwargs.get('data_source_uri', None) + + +class DataTableResponseColumn(msrest.serialization.Model): + """Column definition. + + :param column_name: Name of the column. + :type column_name: str + :param data_type: Data type which looks like 'String' or 'Int32'. + :type data_type: str + :param column_type: Column Type. + :type column_type: str + """ + + _attribute_map = { + 'column_name': {'key': 'columnName', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'column_type': {'key': 'columnType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTableResponseColumn, self).__init__(**kwargs) + self.column_name = kwargs.get('column_name', None) + self.data_type = kwargs.get('data_type', None) + self.column_type = kwargs.get('column_type', None) + + +class DataTableResponseObject(msrest.serialization.Model): + """Data Table which defines columns and raw row values. + + :param table_name: Name of the table. + :type table_name: str + :param columns: List of columns with data types. + :type columns: list[~azure.mgmt.web.v2020_12_01.models.DataTableResponseColumn] + :param rows: Raw row values. + :type rows: list[list[str]] + """ + + _attribute_map = { + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'columns': {'key': 'columns', 'type': '[DataTableResponseColumn]'}, + 'rows': {'key': 'rows', 'type': '[[str]]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataTableResponseObject, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.columns = kwargs.get('columns', None) + self.rows = kwargs.get('rows', None) + + +class DefaultErrorResponse(msrest.serialization.Model): + """App Service error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: Error model. + :vartype error: ~azure.mgmt.web.v2020_12_01.models.DefaultErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, + } + + def __init__( + self, + **kwargs + ): + super(DefaultErrorResponse, self).__init__(**kwargs) + self.error = None + + +class DefaultErrorResponseError(msrest.serialization.Model): + """Error model. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Standardized string to programmatically identify the error. + :vartype code: str + :ivar message: Detailed error description and debugging information. + :vartype message: str + :ivar target: Detailed error description and debugging information. + :vartype target: str + :param details: + :type details: list[~azure.mgmt.web.v2020_12_01.models.DefaultErrorResponseErrorDetailsItem] + :ivar innererror: More information to debug error. + :vartype innererror: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'innererror': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[DefaultErrorResponseErrorDetailsItem]'}, + 'innererror': {'key': 'innererror', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DefaultErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = kwargs.get('details', None) + self.innererror = None + + +class DefaultErrorResponseErrorDetailsItem(msrest.serialization.Model): + """Detailed errors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Standardized string to programmatically identify the error. + :vartype code: str + :ivar message: Detailed error description and debugging information. + :vartype message: str + :ivar target: Detailed error description and debugging information. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DefaultErrorResponseErrorDetailsItem, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + + +class DeletedAppRestoreRequest(ProxyOnlyResource): + """Details about restoring a deleted app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param deleted_site_id: ARM resource ID of the deleted app. Example: + /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}. + :type deleted_site_id: str + :param recover_configuration: If true, deleted site configuration, in addition to content, will + be restored. + :type recover_configuration: bool + :param snapshot_time: Point in time to restore the deleted app from, formatted as a DateTime + string. + If unspecified, default value is the time that the app was deleted. + :type snapshot_time: str + :param use_dr_secondary: If true, the snapshot is retrieved from DRSecondary endpoint. + :type use_dr_secondary: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deleted_site_id': {'key': 'properties.deletedSiteId', 'type': 'str'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, + 'use_dr_secondary': {'key': 'properties.useDRSecondary', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedAppRestoreRequest, self).__init__(**kwargs) + self.deleted_site_id = kwargs.get('deleted_site_id', None) + self.recover_configuration = kwargs.get('recover_configuration', None) + self.snapshot_time = kwargs.get('snapshot_time', None) + self.use_dr_secondary = kwargs.get('use_dr_secondary', None) + + +class DeletedSite(ProxyOnlyResource): + """A deleted app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar deleted_site_id: Numeric id for the deleted site. + :vartype deleted_site_id: int + :ivar deleted_timestamp: Time in UTC when the app was deleted. + :vartype deleted_timestamp: str + :ivar subscription: Subscription containing the deleted site. + :vartype subscription: str + :ivar resource_group: ResourceGroup that contained the deleted site. + :vartype resource_group: str + :ivar deleted_site_name: Name of the deleted site. + :vartype deleted_site_name: str + :ivar slot: Slot of the deleted site. + :vartype slot: str + :ivar kind_properties_kind: Kind of site that was deleted. + :vartype kind_properties_kind: str + :ivar geo_region_name: Geo Region of the deleted site. + :vartype geo_region_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'deleted_site_id': {'readonly': True}, + 'deleted_timestamp': {'readonly': True}, + 'subscription': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'deleted_site_name': {'readonly': True}, + 'slot': {'readonly': True}, + 'kind_properties_kind': {'readonly': True}, + 'geo_region_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deleted_site_id': {'key': 'properties.deletedSiteId', 'type': 'int'}, + 'deleted_timestamp': {'key': 'properties.deletedTimestamp', 'type': 'str'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'deleted_site_name': {'key': 'properties.deletedSiteName', 'type': 'str'}, + 'slot': {'key': 'properties.slot', 'type': 'str'}, + 'kind_properties_kind': {'key': 'properties.kind', 'type': 'str'}, + 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedSite, self).__init__(**kwargs) + self.deleted_site_id = None + self.deleted_timestamp = None + self.subscription = None + self.resource_group = None + self.deleted_site_name = None + self.slot = None + self.kind_properties_kind = None + self.geo_region_name = None + + +class DeletedWebAppCollection(msrest.serialization.Model): + """Collection of deleted apps. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.DeletedSite] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSite]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedWebAppCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class Deployment(ProxyOnlyResource): + """User credentials used for publishing activity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param status: Deployment status. + :type status: int + :param message: Details about deployment status. + :type message: str + :param author: Who authored the deployment. + :type author: str + :param deployer: Who performed the deployment. + :type deployer: str + :param author_email: Author email. + :type author_email: str + :param start_time: Start time. + :type start_time: ~datetime.datetime + :param end_time: End time. + :type end_time: ~datetime.datetime + :param active: True if deployment is currently active, false if completed and null if not + started. + :type active: bool + :param details: Details on deployment. + :type details: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'int'}, + 'message': {'key': 'properties.message', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'deployer': {'key': 'properties.deployer', 'type': 'str'}, + 'author_email': {'key': 'properties.author_email', 'type': 'str'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.end_time', 'type': 'iso-8601'}, + 'active': {'key': 'properties.active', 'type': 'bool'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Deployment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.message = kwargs.get('message', None) + self.author = kwargs.get('author', None) + self.deployer = kwargs.get('deployer', None) + self.author_email = kwargs.get('author_email', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.active = kwargs.get('active', None) + self.details = kwargs.get('details', None) + + +class DeploymentCollection(msrest.serialization.Model): + """Collection of app deployments. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Deployment] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Deployment]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class DeploymentLocations(msrest.serialization.Model): + """List of available locations (regions or App Service Environments) for +deployment of App Service resources. + + :param locations: Available regions. + :type locations: list[~azure.mgmt.web.v2020_12_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full descriptions of the + environments. + :type hosting_environments: list[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironment] + :param hosting_environment_deployment_infos: Available App Service Environments with basic + information. + :type hosting_environment_deployment_infos: + list[~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentDeploymentInfo] + """ + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[GeoRegion]'}, + 'hosting_environments': {'key': 'hostingEnvironments', 'type': '[AppServiceEnvironment]'}, + 'hosting_environment_deployment_infos': {'key': 'hostingEnvironmentDeploymentInfos', 'type': '[HostingEnvironmentDeploymentInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentLocations, self).__init__(**kwargs) + self.locations = kwargs.get('locations', None) + self.hosting_environments = kwargs.get('hosting_environments', None) + self.hosting_environment_deployment_infos = kwargs.get('hosting_environment_deployment_infos', None) + + +class DetectorAbnormalTimePeriod(msrest.serialization.Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event. + :type start_time: ~datetime.datetime + :param end_time: End time of the correlated event. + :type end_time: ~datetime.datetime + :param message: Message describing the event. + :type message: str + :param source: Represents the name of the Detector. + :type source: str + :param priority: Represents the rank of the Detector. + :type priority: float + :param meta_data: Downtime metadata. + :type meta_data: list[list[~azure.mgmt.web.v2020_12_01.models.NameValuePair]] + :param type: Represents the type of the Detector. Possible values include: "ServiceIncident", + "AppDeployment", "AppCrash", "RuntimeIssueDetected", "AseDeployment", "UserIssue", + "PlatformIssue", "Other". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.IssueType + :param solutions: List of proposed solutions. + :type solutions: list[~azure.mgmt.web.v2020_12_01.models.Solution] + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'float'}, + 'meta_data': {'key': 'metaData', 'type': '[[NameValuePair]]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__( + self, + **kwargs + ): + super(DetectorAbnormalTimePeriod, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.message = kwargs.get('message', None) + self.source = kwargs.get('source', None) + self.priority = kwargs.get('priority', None) + self.meta_data = kwargs.get('meta_data', None) + self.type = kwargs.get('type', None) + self.solutions = kwargs.get('solutions', None) + + +class DetectorDefinition(ProxyOnlyResource): + """Class representing detector definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: Display name of the detector. + :vartype display_name: str + :ivar description: Description of the detector. + :vartype description: str + :ivar rank: Detector Rank. + :vartype rank: float + :ivar is_enabled: Flag representing whether detector is enabled or not. + :vartype is_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'rank': {'readonly': True}, + 'is_enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'rank': {'key': 'properties.rank', 'type': 'float'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DetectorDefinition, self).__init__(**kwargs) + self.display_name = None + self.description = None + self.rank = None + self.is_enabled = None + + +class DetectorInfo(msrest.serialization.Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Id of detector. + :vartype id: str + :ivar name: Name of detector. + :vartype name: str + :ivar description: Short description of the detector and its purpose. + :vartype description: str + :ivar author: Author of the detector. + :vartype author: str + :ivar category: Problem category. This serves for organizing group for detectors. + :vartype category: str + :ivar support_topic_list: List of Support Topics for which this detector is enabled. + :vartype support_topic_list: list[~azure.mgmt.web.v2020_12_01.models.SupportTopic] + :ivar analysis_type: Analysis Types for which this detector should apply to. + :vartype analysis_type: list[str] + :ivar type: Whether this detector is an Analysis Detector or not. Possible values include: + "Detector", "Analysis", "CategoryOverview". + :vartype type: str or ~azure.mgmt.web.v2020_12_01.models.DetectorType + :ivar score: Defines score of a detector to power ML based matching. + :vartype score: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'description': {'readonly': True}, + 'author': {'readonly': True}, + 'category': {'readonly': True}, + 'support_topic_list': {'readonly': True}, + 'analysis_type': {'readonly': True}, + 'type': {'readonly': True}, + 'score': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'author': {'key': 'author', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'support_topic_list': {'key': 'supportTopicList', 'type': '[SupportTopic]'}, + 'analysis_type': {'key': 'analysisType', 'type': '[str]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(DetectorInfo, self).__init__(**kwargs) + self.id = None + self.name = None + self.description = None + self.author = None + self.category = None + self.support_topic_list = None + self.analysis_type = None + self.type = None + self.score = None + + +class DetectorResponse(ProxyOnlyResource): + """Class representing Response from Detector. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param metadata: metadata for the detector. + :type metadata: ~azure.mgmt.web.v2020_12_01.models.DetectorInfo + :param dataset: Data Set. + :type dataset: list[~azure.mgmt.web.v2020_12_01.models.DiagnosticData] + :param status: Indicates status of the most severe insight. + :type status: ~azure.mgmt.web.v2020_12_01.models.Status + :param data_providers_metadata: Additional configuration for different data providers to be + used by the UI. + :type data_providers_metadata: list[~azure.mgmt.web.v2020_12_01.models.DataProviderMetadata] + :param suggested_utterances: Suggested utterances where the detector can be applicable. + :type suggested_utterances: ~azure.mgmt.web.v2020_12_01.models.QueryUtterancesResults + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': 'DetectorInfo'}, + 'dataset': {'key': 'properties.dataset', 'type': '[DiagnosticData]'}, + 'status': {'key': 'properties.status', 'type': 'Status'}, + 'data_providers_metadata': {'key': 'properties.dataProvidersMetadata', 'type': '[DataProviderMetadata]'}, + 'suggested_utterances': {'key': 'properties.suggestedUtterances', 'type': 'QueryUtterancesResults'}, + } + + def __init__( + self, + **kwargs + ): + super(DetectorResponse, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.dataset = kwargs.get('dataset', None) + self.status = kwargs.get('status', None) + self.data_providers_metadata = kwargs.get('data_providers_metadata', None) + self.suggested_utterances = kwargs.get('suggested_utterances', None) + + +class DetectorResponseCollection(msrest.serialization.Model): + """Collection of detector responses. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.DetectorResponse] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DetectorResponse]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DetectorResponseCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class DiagnosticAnalysis(ProxyOnlyResource): + """Class representing a diagnostic analysis done on an application. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param start_time: Start time of the period. + :type start_time: ~datetime.datetime + :param end_time: End time of the period. + :type end_time: ~datetime.datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: list[~azure.mgmt.web.v2020_12_01.models.AbnormalTimePeriod] + :param payload: Data by each detector. + :type payload: list[~azure.mgmt.web.v2020_12_01.models.AnalysisData] + :param non_correlated_detectors: Data by each detector for detectors that did not corelate. + :type non_correlated_detectors: list[~azure.mgmt.web.v2020_12_01.models.DetectorDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'abnormal_time_periods': {'key': 'properties.abnormalTimePeriods', 'type': '[AbnormalTimePeriod]'}, + 'payload': {'key': 'properties.payload', 'type': '[AnalysisData]'}, + 'non_correlated_detectors': {'key': 'properties.nonCorrelatedDetectors', 'type': '[DetectorDefinition]'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticAnalysis, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.abnormal_time_periods = kwargs.get('abnormal_time_periods', None) + self.payload = kwargs.get('payload', None) + self.non_correlated_detectors = kwargs.get('non_correlated_detectors', None) + + +class DiagnosticAnalysisCollection(msrest.serialization.Model): + """Collection of Diagnostic Analyses. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AnalysisDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticAnalysisCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class DiagnosticCategory(ProxyOnlyResource): + """Class representing detector definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar description: Description of the diagnostic category. + :vartype description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticCategory, self).__init__(**kwargs) + self.description = None + + +class DiagnosticCategoryCollection(msrest.serialization.Model): + """Collection of Diagnostic Categories. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiagnosticCategory]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticCategoryCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class DiagnosticData(msrest.serialization.Model): + """Set of data with rendering instructions. + + :param table: Data in table form. + :type table: ~azure.mgmt.web.v2020_12_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should be rendered. + :type rendering_properties: ~azure.mgmt.web.v2020_12_01.models.Rendering + """ + + _attribute_map = { + 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, + 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticData, self).__init__(**kwargs) + self.table = kwargs.get('table', None) + self.rendering_properties = kwargs.get('rendering_properties', None) + + +class DiagnosticDetectorCollection(msrest.serialization.Model): + """Collection of Diagnostic Detectors. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.DetectorDefinition] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DetectorDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticDetectorCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class DiagnosticDetectorResponse(ProxyOnlyResource): + """Class representing Response from Diagnostic Detectors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param start_time: Start time of the period. + :type start_time: ~datetime.datetime + :param end_time: End time of the period. + :type end_time: ~datetime.datetime + :param issue_detected: Flag representing Issue was detected. + :type issue_detected: bool + :param detector_definition: Detector's definition. + :type detector_definition: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector. + :type metrics: list[~azure.mgmt.web.v2020_12_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the detector. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2020_12_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2020_12_01.models.NameValuePair]] + :param response_meta_data: Meta Data. + :type response_meta_data: ~azure.mgmt.web.v2020_12_01.models.ResponseMetaData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'issue_detected': {'key': 'properties.issueDetected', 'type': 'bool'}, + 'detector_definition': {'key': 'properties.detectorDefinition', 'type': 'DetectorDefinition'}, + 'metrics': {'key': 'properties.metrics', 'type': '[DiagnosticMetricSet]'}, + 'abnormal_time_periods': {'key': 'properties.abnormalTimePeriods', 'type': '[DetectorAbnormalTimePeriod]'}, + 'data': {'key': 'properties.data', 'type': '[[NameValuePair]]'}, + 'response_meta_data': {'key': 'properties.responseMetaData', 'type': 'ResponseMetaData'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticDetectorResponse, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.issue_detected = kwargs.get('issue_detected', None) + self.detector_definition = kwargs.get('detector_definition', None) + self.metrics = kwargs.get('metrics', None) + self.abnormal_time_periods = kwargs.get('abnormal_time_periods', None) + self.data = kwargs.get('data', None) + self.response_meta_data = kwargs.get('response_meta_data', None) + + +class DiagnosticMetricSample(msrest.serialization.Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured. + :type timestamp: ~datetime.datetime + :param role_instance: Role Instance. Null if this counter is not per instance + This is returned and should be whichever instance name we desire to be returned + i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) + where RDWORKERNAME is Machine name below and RoleInstance name in parenthesis. + :type role_instance: str + :param total: Total value of the metric. If multiple measurements are made this will have sum + of all. + :type total: float + :param maximum: Maximum of the metric sampled during the time period. + :type maximum: float + :param minimum: Minimum of the metric sampled during the time period. + :type minimum: float + :param is_aggregated: Whether the values are aggregates across all workers or not. + :type is_aggregated: bool + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'role_instance': {'key': 'roleInstance', 'type': 'str'}, + 'total': {'key': 'total', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'is_aggregated': {'key': 'isAggregated', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticMetricSample, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.role_instance = kwargs.get('role_instance', None) + self.total = kwargs.get('total', None) + self.maximum = kwargs.get('maximum', None) + self.minimum = kwargs.get('minimum', None) + self.is_aggregated = kwargs.get('is_aggregated', None) + + +class DiagnosticMetricSet(msrest.serialization.Model): + """Class representing Diagnostic Metric information. + + :param name: Name of the metric. + :type name: str + :param unit: Metric's unit. + :type unit: str + :param start_time: Start time of the period. + :type start_time: ~datetime.datetime + :param end_time: End time of the period. + :type end_time: ~datetime.datetime + :param time_grain: Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D. + :type time_grain: str + :param values: Collection of metric values for the selected period based on the + {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}. + :type values: list[~azure.mgmt.web.v2020_12_01.models.DiagnosticMetricSample] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[DiagnosticMetricSample]'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticMetricSet, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.time_grain = kwargs.get('time_grain', None) + self.values = kwargs.get('values', None) + + +class Dimension(msrest.serialization.Model): + """Dimension of a resource metric. For e.g. instance specific HTTP requests for a web app, +where instance name is dimension of the metric HTTP request. + + :param name: + :type name: str + :param display_name: + :type display_name: str + :param internal_name: + :type internal_name: str + :param to_be_exported_for_shoebox: + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Dimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.internal_name = kwargs.get('internal_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class Domain(Resource): + """Information about a domain. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param contact_admin: Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_billing: Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_registrant: Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_tech: Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_12_01.models.Contact + :ivar registration_status: Domain registration status. Possible values include: "Active", + "Awaiting", "Cancelled", "Confiscated", "Disabled", "Excluded", "Expired", "Failed", "Held", + "Locked", "Parked", "Pending", "Reserved", "Reverted", "Suspended", "Transferred", "Unknown", + "Unlocked", "Unparked", "Updated", "JsonConverterFailed". + :vartype registration_status: str or ~azure.mgmt.web.v2020_12_01.models.DomainStatus + :ivar provisioning_state: Domain provisioning state. Possible values include: "Succeeded", + "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: :code:`true` if domain privacy is enabled for this domain; + otherwise, :code:`false`. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: ~datetime.datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: ~datetime.datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: ~datetime.datetime + :param auto_renew: :code:`true` if the domain should be automatically renewed; + otherwise, :code:`false`. + :type auto_renew: bool + :ivar ready_for_dns_record_management: :code:`true` if Azure can assign this + domain to App Service apps; otherwise, :code:`false`. This value will be + :code:`true` if domain registration status is active and + it is hosted on name servers Azure has programmatic access to. + :vartype ready_for_dns_record_management: bool + :ivar managed_host_names: All hostnames derived from the domain and assigned to Azure + resources. + :vartype managed_host_names: list[~azure.mgmt.web.v2020_12_01.models.HostName] + :param consent: Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_12_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str or + ~azure.mgmt.web.v2020_12_01.models.DomainPropertiesDomainNotRenewableReasonsItem] + :param dns_type: Current DNS type. Possible values include: "AzureDns", + "DefaultDomainRegistrarDns". + :type dns_type: str or ~azure.mgmt.web.v2020_12_01.models.DnsType + :param dns_zone_id: Azure DNS Zone to use. + :type dns_zone_id: str + :param target_dns_type: Target DNS type (would be used for migration). Possible values include: + "AzureDns", "DefaultDomainRegistrarDns". + :type target_dns_type: str or ~azure.mgmt.web.v2020_12_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'registration_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'name_servers': {'readonly': True}, + 'created_time': {'readonly': True}, + 'expiration_time': {'readonly': True}, + 'last_renewed_time': {'readonly': True}, + 'ready_for_dns_record_management': {'readonly': True}, + 'managed_host_names': {'readonly': True}, + 'domain_not_renewable_reasons': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'contact_admin': {'key': 'properties.contactAdmin', 'type': 'Contact'}, + 'contact_billing': {'key': 'properties.contactBilling', 'type': 'Contact'}, + 'contact_registrant': {'key': 'properties.contactRegistrant', 'type': 'Contact'}, + 'contact_tech': {'key': 'properties.contactTech', 'type': 'Contact'}, + 'registration_status': {'key': 'properties.registrationStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name_servers': {'key': 'properties.nameServers', 'type': '[str]'}, + 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + 'last_renewed_time': {'key': 'properties.lastRenewedTime', 'type': 'iso-8601'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'ready_for_dns_record_management': {'key': 'properties.readyForDnsRecordManagement', 'type': 'bool'}, + 'managed_host_names': {'key': 'properties.managedHostNames', 'type': '[HostName]'}, + 'consent': {'key': 'properties.consent', 'type': 'DomainPurchaseConsent'}, + 'domain_not_renewable_reasons': {'key': 'properties.domainNotRenewableReasons', 'type': '[str]'}, + 'dns_type': {'key': 'properties.dnsType', 'type': 'str'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'str'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Domain, self).__init__(**kwargs) + self.contact_admin = kwargs.get('contact_admin', None) + self.contact_billing = kwargs.get('contact_billing', None) + self.contact_registrant = kwargs.get('contact_registrant', None) + self.contact_tech = kwargs.get('contact_tech', None) + self.registration_status = None + self.provisioning_state = None + self.name_servers = None + self.privacy = kwargs.get('privacy', None) + self.created_time = None + self.expiration_time = None + self.last_renewed_time = None + self.auto_renew = kwargs.get('auto_renew', True) + self.ready_for_dns_record_management = None + self.managed_host_names = None + self.consent = kwargs.get('consent', None) + self.domain_not_renewable_reasons = None + self.dns_type = kwargs.get('dns_type', None) + self.dns_zone_id = kwargs.get('dns_zone_id', None) + self.target_dns_type = kwargs.get('target_dns_type', None) + self.auth_code = kwargs.get('auth_code', None) + + +class DomainAvailabilityCheckResult(msrest.serialization.Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: :code:`true` if domain can be purchased using CreateDomain API; + otherwise, :code:`false`. + :type available: bool + :param domain_type: Valid values are Regular domain: Azure will charge the full price of domain + registration, SoftDeleted: Purchasing this domain will simply restore it and this operation + will not cost anything. Possible values include: "Regular", "SoftDeleted". + :type domain_type: str or ~azure.mgmt.web.v2020_12_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DomainAvailabilityCheckResult, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.available = kwargs.get('available', None) + self.domain_type = kwargs.get('domain_type', None) + + +class DomainCollection(msrest.serialization.Model): + """Collection of domains. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Domain] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Domain]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DomainCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class DomainControlCenterSsoRequest(msrest.serialization.Model): + """Single sign-on request information for domain management. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar url: URL where the single sign-on request is to be made. + :vartype url: str + :ivar post_parameter_key: Post parameter key. + :vartype post_parameter_key: str + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. + :vartype post_parameter_value: str + """ + + _validation = { + 'url': {'readonly': True}, + 'post_parameter_key': {'readonly': True}, + 'post_parameter_value': {'readonly': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + 'post_parameter_key': {'key': 'postParameterKey', 'type': 'str'}, + 'post_parameter_value': {'key': 'postParameterValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DomainControlCenterSsoRequest, self).__init__(**kwargs) + self.url = None + self.post_parameter_key = None + self.post_parameter_value = None + + +class DomainOwnershipIdentifier(ProxyOnlyResource): + """Domain ownership Identifier. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param ownership_id: Ownership Id. + :type ownership_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ownership_id': {'key': 'properties.ownershipId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DomainOwnershipIdentifier, self).__init__(**kwargs) + self.ownership_id = kwargs.get('ownership_id', None) + + +class DomainOwnershipIdentifierCollection(msrest.serialization.Model): + """Collection of domain ownership identifiers. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DomainOwnershipIdentifierCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class DomainPatchResource(ProxyOnlyResource): + """ARM resource for a domain. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_billing: Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_registrant: Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_tech: Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_12_01.models.Contact + :ivar registration_status: Domain registration status. Possible values include: "Active", + "Awaiting", "Cancelled", "Confiscated", "Disabled", "Excluded", "Expired", "Failed", "Held", + "Locked", "Parked", "Pending", "Reserved", "Reverted", "Suspended", "Transferred", "Unknown", + "Unlocked", "Unparked", "Updated", "JsonConverterFailed". + :vartype registration_status: str or ~azure.mgmt.web.v2020_12_01.models.DomainStatus + :ivar provisioning_state: Domain provisioning state. Possible values include: "Succeeded", + "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: :code:`true` if domain privacy is enabled for this domain; + otherwise, :code:`false`. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: ~datetime.datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: ~datetime.datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: ~datetime.datetime + :param auto_renew: :code:`true` if the domain should be automatically renewed; + otherwise, :code:`false`. + :type auto_renew: bool + :ivar ready_for_dns_record_management: :code:`true` if Azure can assign this + domain to App Service apps; otherwise, :code:`false`. This value will be + :code:`true` if domain registration status is active and + it is hosted on name servers Azure has programmatic access to. + :vartype ready_for_dns_record_management: bool + :ivar managed_host_names: All hostnames derived from the domain and assigned to Azure + resources. + :vartype managed_host_names: list[~azure.mgmt.web.v2020_12_01.models.HostName] + :param consent: Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_12_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str or + ~azure.mgmt.web.v2020_12_01.models.DomainPatchResourcePropertiesDomainNotRenewableReasonsItem] + :param dns_type: Current DNS type. Possible values include: "AzureDns", + "DefaultDomainRegistrarDns". + :type dns_type: str or ~azure.mgmt.web.v2020_12_01.models.DnsType + :param dns_zone_id: Azure DNS Zone to use. + :type dns_zone_id: str + :param target_dns_type: Target DNS type (would be used for migration). Possible values include: + "AzureDns", "DefaultDomainRegistrarDns". + :type target_dns_type: str or ~azure.mgmt.web.v2020_12_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'registration_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'name_servers': {'readonly': True}, + 'created_time': {'readonly': True}, + 'expiration_time': {'readonly': True}, + 'last_renewed_time': {'readonly': True}, + 'ready_for_dns_record_management': {'readonly': True}, + 'managed_host_names': {'readonly': True}, + 'domain_not_renewable_reasons': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'contact_admin': {'key': 'properties.contactAdmin', 'type': 'Contact'}, + 'contact_billing': {'key': 'properties.contactBilling', 'type': 'Contact'}, + 'contact_registrant': {'key': 'properties.contactRegistrant', 'type': 'Contact'}, + 'contact_tech': {'key': 'properties.contactTech', 'type': 'Contact'}, + 'registration_status': {'key': 'properties.registrationStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name_servers': {'key': 'properties.nameServers', 'type': '[str]'}, + 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + 'last_renewed_time': {'key': 'properties.lastRenewedTime', 'type': 'iso-8601'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'ready_for_dns_record_management': {'key': 'properties.readyForDnsRecordManagement', 'type': 'bool'}, + 'managed_host_names': {'key': 'properties.managedHostNames', 'type': '[HostName]'}, + 'consent': {'key': 'properties.consent', 'type': 'DomainPurchaseConsent'}, + 'domain_not_renewable_reasons': {'key': 'properties.domainNotRenewableReasons', 'type': '[str]'}, + 'dns_type': {'key': 'properties.dnsType', 'type': 'str'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'str'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DomainPatchResource, self).__init__(**kwargs) + self.contact_admin = kwargs.get('contact_admin', None) + self.contact_billing = kwargs.get('contact_billing', None) + self.contact_registrant = kwargs.get('contact_registrant', None) + self.contact_tech = kwargs.get('contact_tech', None) + self.registration_status = None + self.provisioning_state = None + self.name_servers = None + self.privacy = kwargs.get('privacy', None) + self.created_time = None + self.expiration_time = None + self.last_renewed_time = None + self.auto_renew = kwargs.get('auto_renew', True) + self.ready_for_dns_record_management = None + self.managed_host_names = None + self.consent = kwargs.get('consent', None) + self.domain_not_renewable_reasons = None + self.dns_type = kwargs.get('dns_type', None) + self.dns_zone_id = kwargs.get('dns_zone_id', None) + self.target_dns_type = kwargs.get('target_dns_type', None) + self.auth_code = kwargs.get('auth_code', None) + + +class DomainPurchaseConsent(msrest.serialization.Model): + """Domain purchase consent object, representing acceptance of applicable legal agreements. + + :param agreement_keys: List of applicable legal agreement keys. This list can be retrieved + using ListLegalAgreements API under :code:`TopLevelDomain` resource. + :type agreement_keys: list[str] + :param agreed_by: Client IP address. + :type agreed_by: str + :param agreed_at: Timestamp when the agreements were accepted. + :type agreed_at: ~datetime.datetime + """ + + _attribute_map = { + 'agreement_keys': {'key': 'agreementKeys', 'type': '[str]'}, + 'agreed_by': {'key': 'agreedBy', 'type': 'str'}, + 'agreed_at': {'key': 'agreedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DomainPurchaseConsent, self).__init__(**kwargs) + self.agreement_keys = kwargs.get('agreement_keys', None) + self.agreed_by = kwargs.get('agreed_by', None) + self.agreed_at = kwargs.get('agreed_at', None) + + +class DomainRecommendationSearchParameters(msrest.serialization.Model): + """Domain recommendation search parameters. + + :param keywords: Keywords to be used for generating domain recommendations. + :type keywords: str + :param max_domain_recommendations: Maximum number of recommendations. + :type max_domain_recommendations: int + """ + + _attribute_map = { + 'keywords': {'key': 'keywords', 'type': 'str'}, + 'max_domain_recommendations': {'key': 'maxDomainRecommendations', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(DomainRecommendationSearchParameters, self).__init__(**kwargs) + self.keywords = kwargs.get('keywords', None) + self.max_domain_recommendations = kwargs.get('max_domain_recommendations', None) + + +class EnabledConfig(msrest.serialization.Model): + """Enabled configuration. + + :param enabled: True if configuration is enabled, false if it is disabled and null if + configuration is not set. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(EnabledConfig, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + + +class EndpointDependency(msrest.serialization.Model): + """A domain name that a service is reached at, including details of the current connection status. + + :param domain_name: The domain name of the dependency. + :type domain_name: str + :param endpoint_details: The IP Addresses and Ports used when connecting to DomainName. + :type endpoint_details: list[~azure.mgmt.web.v2020_12_01.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__( + self, + **kwargs + ): + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.endpoint_details = kwargs.get('endpoint_details', None) + + +class EndpointDetail(msrest.serialization.Model): + """Current TCP connectivity information from the App Service Environment to a single endpoint. + + :param ip_address: An IP Address that Domain Name currently resolves to. + :type ip_address: str + :param port: The port an endpoint is connected to. + :type port: int + :param latency: The time in milliseconds it takes for a TCP connection to be created from the + App Service Environment to this IpAddress at this Port. + :type latency: float + :param is_accessible: Whether it is possible to create a TCP connection from the App Service + Environment to this IpAddress at this Port. + :type is_accessible: bool + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'latency': {'key': 'latency', 'type': 'float'}, + 'is_accessible': {'key': 'isAccessible', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(EndpointDetail, self).__init__(**kwargs) + self.ip_address = kwargs.get('ip_address', None) + self.port = kwargs.get('port', None) + self.latency = kwargs.get('latency', None) + self.is_accessible = kwargs.get('is_accessible', None) + + +class ErrorEntity(msrest.serialization.Model): + """Body of the error response returned from the API. + + :param extended_code: Type of error. + :type extended_code: str + :param message_template: Message template. + :type message_template: str + :param parameters: Parameters for the template. + :type parameters: list[str] + :param inner_errors: Inner errors. + :type inner_errors: list[~azure.mgmt.web.v2020_12_01.models.ErrorEntity] + :param code: Basic error code. + :type code: str + :param message: Any details of the error. + :type message: str + """ + + _attribute_map = { + 'extended_code': {'key': 'extendedCode', 'type': 'str'}, + 'message_template': {'key': 'messageTemplate', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[str]'}, + 'inner_errors': {'key': 'innerErrors', 'type': '[ErrorEntity]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorEntity, self).__init__(**kwargs) + self.extended_code = kwargs.get('extended_code', None) + self.message_template = kwargs.get('message_template', None) + self.parameters = kwargs.get('parameters', None) + self.inner_errors = kwargs.get('inner_errors', None) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class Experiments(msrest.serialization.Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2020_12_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = kwargs.get('ramp_up_rules', None) + + +class Facebook(ProxyOnlyResource): + """Facebook. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.AppRegistration + :param graph_api_version: + :type graph_api_version: str + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.LoginScopes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'AppRegistration'}, + 'graph_api_version': {'key': 'properties.graphApiVersion', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + } + + def __init__( + self, + **kwargs + ): + super(Facebook, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.registration = kwargs.get('registration', None) + self.graph_api_version = kwargs.get('graph_api_version', None) + self.login = kwargs.get('login', None) + + +class FileSystemApplicationLogsConfig(msrest.serialization.Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: "Off", "Verbose", "Information", "Warning", + "Error". + :type level: str or ~azure.mgmt.web.v2020_12_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = kwargs.get('level', None) + + +class FileSystemHttpLogsConfig(msrest.serialization.Model): + """Http logs to file system configuration. + + :param retention_in_mb: Maximum size in megabytes that http log files can use. + When reached old log files will be removed to make space for new ones. + Value can range between 25 and 100. + :type retention_in_mb: int + :param retention_in_days: Retention in days. + Remove files older than X days. + 0 or lower means no retention. + :type retention_in_days: int + :param enabled: True if configuration is enabled, false if it is disabled and null if + configuration is not set. + :type enabled: bool + """ + + _validation = { + 'retention_in_mb': {'maximum': 100, 'minimum': 25}, + } + + _attribute_map = { + 'retention_in_mb': {'key': 'retentionInMb', 'type': 'int'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(FileSystemHttpLogsConfig, self).__init__(**kwargs) + self.retention_in_mb = kwargs.get('retention_in_mb', None) + self.retention_in_days = kwargs.get('retention_in_days', None) + self.enabled = kwargs.get('enabled', None) + + +class FileSystemTokenStore(ProxyOnlyResource): + """FileSystemTokenStore. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param directory: + :type directory: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'directory': {'key': 'properties.directory', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FileSystemTokenStore, self).__init__(**kwargs) + self.directory = kwargs.get('directory', None) + + +class ForwardProxy(ProxyOnlyResource): + """ForwardProxy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param convention: Possible values include: "NoProxy", "Standard", "Custom". + :type convention: str or ~azure.mgmt.web.v2020_12_01.models.ForwardProxyConvention + :param custom_host_header_name: + :type custom_host_header_name: str + :param custom_proto_header_name: + :type custom_proto_header_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'convention': {'key': 'properties.convention', 'type': 'str'}, + 'custom_host_header_name': {'key': 'properties.customHostHeaderName', 'type': 'str'}, + 'custom_proto_header_name': {'key': 'properties.customProtoHeaderName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ForwardProxy, self).__init__(**kwargs) + self.convention = kwargs.get('convention', None) + self.custom_host_header_name = kwargs.get('custom_host_header_name', None) + self.custom_proto_header_name = kwargs.get('custom_proto_header_name', None) + + +class FunctionAppMajorVersion(msrest.serialization.Model): + """Function App stack major version. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_text: Function App stack major version (display only). + :vartype display_text: str + :ivar value: Function App stack major version name. + :vartype value: str + :ivar minor_versions: Minor versions associated with the major version. + :vartype minor_versions: list[~azure.mgmt.web.v2020_12_01.models.FunctionAppMinorVersion] + """ + + _validation = { + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'minor_versions': {'readonly': True}, + } + + _attribute_map = { + 'display_text': {'key': 'displayText', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'minor_versions': {'key': 'minorVersions', 'type': '[FunctionAppMinorVersion]'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionAppMajorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.minor_versions = None + + +class FunctionAppMinorVersion(msrest.serialization.Model): + """Function App stack minor version. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_text: Function App stack (display only). + :vartype display_text: str + :ivar value: Function App stack name. + :vartype value: str + :ivar stack_settings: Settings associated with the minor version. + :vartype stack_settings: ~azure.mgmt.web.v2020_12_01.models.FunctionAppRuntimes + """ + + _validation = { + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'stack_settings': {'readonly': True}, + } + + _attribute_map = { + 'display_text': {'key': 'displayText', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'stack_settings': {'key': 'stackSettings', 'type': 'FunctionAppRuntimes'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionAppMinorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.stack_settings = None + + +class FunctionAppRuntimes(msrest.serialization.Model): + """Function App stack runtimes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar linux_runtime_settings: Linux-specific settings associated with the minor version. + :vartype linux_runtime_settings: ~azure.mgmt.web.v2020_12_01.models.FunctionAppRuntimeSettings + :ivar windows_runtime_settings: Windows-specific settings associated with the minor version. + :vartype windows_runtime_settings: + ~azure.mgmt.web.v2020_12_01.models.FunctionAppRuntimeSettings + """ + + _validation = { + 'linux_runtime_settings': {'readonly': True}, + 'windows_runtime_settings': {'readonly': True}, + } + + _attribute_map = { + 'linux_runtime_settings': {'key': 'linuxRuntimeSettings', 'type': 'FunctionAppRuntimeSettings'}, + 'windows_runtime_settings': {'key': 'windowsRuntimeSettings', 'type': 'FunctionAppRuntimeSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionAppRuntimes, self).__init__(**kwargs) + self.linux_runtime_settings = None + self.windows_runtime_settings = None + + +class FunctionAppRuntimeSettings(msrest.serialization.Model): + """Function App runtime settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar runtime_version: Function App stack minor version (runtime only). + :vartype runtime_version: str + :ivar remote_debugging_supported: :code:`true` if remote debugging is supported + for the stack; otherwise, :code:`false`. + :vartype remote_debugging_supported: bool + :ivar app_insights_settings: Application Insights settings associated with the minor version. + :vartype app_insights_settings: + ~azure.mgmt.web.v2020_12_01.models.AppInsightsWebAppStackSettings + :ivar git_hub_action_settings: GitHub Actions settings associated with the minor version. + :vartype git_hub_action_settings: + ~azure.mgmt.web.v2020_12_01.models.GitHubActionWebAppStackSettings + :ivar app_settings_dictionary: Application settings associated with the minor version. + :vartype app_settings_dictionary: dict[str, str] + :ivar site_config_properties_dictionary: Configuration settings associated with the minor + version. + :vartype site_config_properties_dictionary: + ~azure.mgmt.web.v2020_12_01.models.SiteConfigPropertiesDictionary + :ivar supported_functions_extension_versions: List of supported Functions extension versions. + :vartype supported_functions_extension_versions: list[str] + :ivar is_preview: :code:`true` if the stack is in preview; otherwise, + :code:`false`. + :vartype is_preview: bool + :ivar is_deprecated: :code:`true` if the stack is deprecated; otherwise, + :code:`false`. + :vartype is_deprecated: bool + :ivar is_hidden: :code:`true` if the stack should be hidden; otherwise, + :code:`false`. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: ~datetime.datetime + :ivar is_auto_update: :code:`true` if the stack version is auto-updated; + otherwise, :code:`false`. + :vartype is_auto_update: bool + :ivar is_early_access: :code:`true` if the minor version is early-access; + otherwise, :code:`false`. + :vartype is_early_access: bool + :ivar is_default: :code:`true` if the minor version the default; otherwise, + :code:`false`. + :vartype is_default: bool + """ + + _validation = { + 'runtime_version': {'readonly': True}, + 'remote_debugging_supported': {'readonly': True}, + 'app_insights_settings': {'readonly': True}, + 'git_hub_action_settings': {'readonly': True}, + 'app_settings_dictionary': {'readonly': True}, + 'site_config_properties_dictionary': {'readonly': True}, + 'supported_functions_extension_versions': {'readonly': True}, + 'is_preview': {'readonly': True}, + 'is_deprecated': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'end_of_life_date': {'readonly': True}, + 'is_auto_update': {'readonly': True}, + 'is_early_access': {'readonly': True}, + 'is_default': {'readonly': True}, + } + + _attribute_map = { + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'remote_debugging_supported': {'key': 'remoteDebuggingSupported', 'type': 'bool'}, + 'app_insights_settings': {'key': 'appInsightsSettings', 'type': 'AppInsightsWebAppStackSettings'}, + 'git_hub_action_settings': {'key': 'gitHubActionSettings', 'type': 'GitHubActionWebAppStackSettings'}, + 'app_settings_dictionary': {'key': 'appSettingsDictionary', 'type': '{str}'}, + 'site_config_properties_dictionary': {'key': 'siteConfigPropertiesDictionary', 'type': 'SiteConfigPropertiesDictionary'}, + 'supported_functions_extension_versions': {'key': 'supportedFunctionsExtensionVersions', 'type': '[str]'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'is_auto_update': {'key': 'isAutoUpdate', 'type': 'bool'}, + 'is_early_access': {'key': 'isEarlyAccess', 'type': 'bool'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionAppRuntimeSettings, self).__init__(**kwargs) + self.runtime_version = None + self.remote_debugging_supported = None + self.app_insights_settings = None + self.git_hub_action_settings = None + self.app_settings_dictionary = None + self.site_config_properties_dictionary = None + self.supported_functions_extension_versions = None + self.is_preview = None + self.is_deprecated = None + self.is_hidden = None + self.end_of_life_date = None + self.is_auto_update = None + self.is_early_access = None + self.is_default = None + + +class FunctionAppStack(ProxyOnlyResource): + """Function App Stack. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Function App stack location. + :vartype location: str + :ivar display_text: Function App stack (display only). + :vartype display_text: str + :ivar value: Function App stack name. + :vartype value: str + :ivar major_versions: List of major versions available. + :vartype major_versions: list[~azure.mgmt.web.v2020_12_01.models.FunctionAppMajorVersion] + :ivar preferred_os: Function App stack preferred OS. Possible values include: "Windows", + "Linux". + :vartype preferred_os: str or ~azure.mgmt.web.v2020_12_01.models.StackPreferredOs + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'major_versions': {'readonly': True}, + 'preferred_os': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'display_text': {'key': 'properties.displayText', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'major_versions': {'key': 'properties.majorVersions', 'type': '[FunctionAppMajorVersion]'}, + 'preferred_os': {'key': 'properties.preferredOs', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionAppStack, self).__init__(**kwargs) + self.location = None + self.display_text = None + self.value = None + self.major_versions = None + self.preferred_os = None + + +class FunctionAppStackCollection(msrest.serialization.Model): + """Collection of Function app Stacks. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.FunctionAppStack] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FunctionAppStack]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionAppStackCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class FunctionEnvelope(ProxyOnlyResource): + """Function information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param function_app_id: Function App ID. + :type function_app_id: str + :param script_root_path_href: Script root path URI. + :type script_root_path_href: str + :param script_href: Script URI. + :type script_href: str + :param config_href: Config URI. + :type config_href: str + :param test_data_href: Test data URI. + :type test_data_href: str + :param secrets_file_href: Secrets file URI. + :type secrets_file_href: str + :param href: Function URI. + :type href: str + :param config: Config information. + :type config: object + :param files: File list. + :type files: dict[str, str] + :param test_data: Test data used when testing via the Azure Portal. + :type test_data: str + :param invoke_url_template: The invocation URL. + :type invoke_url_template: str + :param language: The function language. + :type language: str + :param is_disabled: Gets or sets a value indicating whether the function is disabled. + :type is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'function_app_id': {'key': 'properties.function_app_id', 'type': 'str'}, + 'script_root_path_href': {'key': 'properties.script_root_path_href', 'type': 'str'}, + 'script_href': {'key': 'properties.script_href', 'type': 'str'}, + 'config_href': {'key': 'properties.config_href', 'type': 'str'}, + 'test_data_href': {'key': 'properties.test_data_href', 'type': 'str'}, + 'secrets_file_href': {'key': 'properties.secrets_file_href', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'config': {'key': 'properties.config', 'type': 'object'}, + 'files': {'key': 'properties.files', 'type': '{str}'}, + 'test_data': {'key': 'properties.test_data', 'type': 'str'}, + 'invoke_url_template': {'key': 'properties.invoke_url_template', 'type': 'str'}, + 'language': {'key': 'properties.language', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionEnvelope, self).__init__(**kwargs) + self.function_app_id = kwargs.get('function_app_id', None) + self.script_root_path_href = kwargs.get('script_root_path_href', None) + self.script_href = kwargs.get('script_href', None) + self.config_href = kwargs.get('config_href', None) + self.test_data_href = kwargs.get('test_data_href', None) + self.secrets_file_href = kwargs.get('secrets_file_href', None) + self.href = kwargs.get('href', None) + self.config = kwargs.get('config', None) + self.files = kwargs.get('files', None) + self.test_data = kwargs.get('test_data', None) + self.invoke_url_template = kwargs.get('invoke_url_template', None) + self.language = kwargs.get('language', None) + self.is_disabled = kwargs.get('is_disabled', None) + + +class FunctionEnvelopeCollection(msrest.serialization.Model): + """Collection of Kudu function information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FunctionEnvelope]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionEnvelopeCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class FunctionSecrets(msrest.serialization.Model): + """Function secrets. + + :param key: Secret key. + :type key: str + :param trigger_url: Trigger URL. + :type trigger_url: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'trigger_url': {'key': 'trigger_url', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionSecrets, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.trigger_url = kwargs.get('trigger_url', None) + + +class GeoRegion(ProxyOnlyResource): + """Geographical region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar description: Region description. + :vartype description: str + :ivar display_name: Display name for region. + :vartype display_name: str + :ivar org_domain: Display name for region. + :vartype org_domain: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'display_name': {'readonly': True}, + 'org_domain': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'org_domain': {'key': 'properties.orgDomain', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GeoRegion, self).__init__(**kwargs) + self.description = None + self.display_name = None + self.org_domain = None + + +class GeoRegionCollection(msrest.serialization.Model): + """Collection of geographical regions. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.GeoRegion] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[GeoRegion]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GeoRegionCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class GitHub(ProxyOnlyResource): + """GitHub. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.LoginScopes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'ClientRegistration'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + } + + def __init__( + self, + **kwargs + ): + super(GitHub, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.registration = kwargs.get('registration', None) + self.login = kwargs.get('login', None) + + +class GitHubActionCodeConfiguration(msrest.serialization.Model): + """The GitHub action code configuration. + + :param runtime_stack: Runtime stack is used to determine the workflow file content for code + base apps. + :type runtime_stack: str + :param runtime_version: Runtime version is used to determine what build version to set in the + workflow file. + :type runtime_version: str + """ + + _attribute_map = { + 'runtime_stack': {'key': 'runtimeStack', 'type': 'str'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GitHubActionCodeConfiguration, self).__init__(**kwargs) + self.runtime_stack = kwargs.get('runtime_stack', None) + self.runtime_version = kwargs.get('runtime_version', None) + + +class GitHubActionConfiguration(msrest.serialization.Model): + """The GitHub action configuration. + + :param code_configuration: GitHub Action code configuration. + :type code_configuration: ~azure.mgmt.web.v2020_12_01.models.GitHubActionCodeConfiguration + :param container_configuration: GitHub Action container configuration. + :type container_configuration: + ~azure.mgmt.web.v2020_12_01.models.GitHubActionContainerConfiguration + :param is_linux: This will help determine the workflow configuration to select. + :type is_linux: bool + :param generate_workflow_file: Workflow option to determine whether the workflow file should be + generated and written to the repository. + :type generate_workflow_file: bool + """ + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'GitHubActionCodeConfiguration'}, + 'container_configuration': {'key': 'containerConfiguration', 'type': 'GitHubActionContainerConfiguration'}, + 'is_linux': {'key': 'isLinux', 'type': 'bool'}, + 'generate_workflow_file': {'key': 'generateWorkflowFile', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(GitHubActionConfiguration, self).__init__(**kwargs) + self.code_configuration = kwargs.get('code_configuration', None) + self.container_configuration = kwargs.get('container_configuration', None) + self.is_linux = kwargs.get('is_linux', None) + self.generate_workflow_file = kwargs.get('generate_workflow_file', None) + + +class GitHubActionContainerConfiguration(msrest.serialization.Model): + """The GitHub action container configuration. + + :param server_url: The server URL for the container registry where the build will be hosted. + :type server_url: str + :param image_name: The image name for the build. + :type image_name: str + :param username: The username used to upload the image to the container registry. + :type username: str + :param password: The password used to upload the image to the container registry. + :type password: str + """ + + _attribute_map = { + 'server_url': {'key': 'serverUrl', 'type': 'str'}, + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GitHubActionContainerConfiguration, self).__init__(**kwargs) + self.server_url = kwargs.get('server_url', None) + self.image_name = kwargs.get('image_name', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class GitHubActionWebAppStackSettings(msrest.serialization.Model): + """GitHub Actions Web App stack settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar is_supported: :code:`true` if GitHub Actions is supported for the stack; + otherwise, :code:`false`. + :vartype is_supported: bool + :ivar supported_version: The minor version that is supported for GitHub Actions. + :vartype supported_version: str + """ + + _validation = { + 'is_supported': {'readonly': True}, + 'supported_version': {'readonly': True}, + } + + _attribute_map = { + 'is_supported': {'key': 'isSupported', 'type': 'bool'}, + 'supported_version': {'key': 'supportedVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GitHubActionWebAppStackSettings, self).__init__(**kwargs) + self.is_supported = None + self.supported_version = None + + +class GlobalCsmSkuDescription(msrest.serialization.Model): + """A Global SKU Description. + + :param name: Name of the resource SKU. + :type name: str + :param tier: Service Tier of the resource SKU. + :type tier: str + :param size: Size specifier of the resource SKU. + :type size: str + :param family: Family code of the resource SKU. + :type family: str + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2020_12_01.models.SkuCapacity + :param locations: Locations of the SKU. + :type locations: list[str] + :param capabilities: Capabilities of the SKU, e.g., is traffic manager enabled?. + :type capabilities: list[~azure.mgmt.web.v2020_12_01.models.Capability] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, + } + + def __init__( + self, + **kwargs + ): + super(GlobalCsmSkuDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + self.locations = kwargs.get('locations', None) + self.capabilities = kwargs.get('capabilities', None) + + +class GlobalValidation(ProxyOnlyResource): + """GlobalValidation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param require_authentication: + :type require_authentication: bool + :param unauthenticated_client_action: Possible values include: "RedirectToLoginPage", + "AllowAnonymous", "Return401", "Return403". + :type unauthenticated_client_action: str or + ~azure.mgmt.web.v2020_12_01.models.UnauthenticatedClientActionV2 + :param redirect_to_provider: + :type redirect_to_provider: str + :param excluded_paths: + :type excluded_paths: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'require_authentication': {'key': 'properties.requireAuthentication', 'type': 'bool'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'str'}, + 'redirect_to_provider': {'key': 'properties.redirectToProvider', 'type': 'str'}, + 'excluded_paths': {'key': 'properties.excludedPaths', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(GlobalValidation, self).__init__(**kwargs) + self.require_authentication = kwargs.get('require_authentication', None) + self.unauthenticated_client_action = kwargs.get('unauthenticated_client_action', None) + self.redirect_to_provider = kwargs.get('redirect_to_provider', None) + self.excluded_paths = kwargs.get('excluded_paths', None) + + +class Google(ProxyOnlyResource): + """Google. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.LoginScopes + :param validation: + :type validation: ~azure.mgmt.web.v2020_12_01.models.AllowedAudiencesValidation + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'ClientRegistration'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + 'validation': {'key': 'properties.validation', 'type': 'AllowedAudiencesValidation'}, + } + + def __init__( + self, + **kwargs + ): + super(Google, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.registration = kwargs.get('registration', None) + self.login = kwargs.get('login', None) + self.validation = kwargs.get('validation', None) + + +class HandlerMapping(msrest.serialization.Model): + """The IIS handler mappings used to define which handler processes HTTP requests with certain extension. +For example, it is used to configure php-cgi.exe process to handle all HTTP requests with *.php extension. + + :param extension: Requests with this extension will be handled using the specified FastCGI + application. + :type extension: str + :param script_processor: The absolute path to the FastCGI application. + :type script_processor: str + :param arguments: Command-line arguments to be passed to the script processor. + :type arguments: str + """ + + _attribute_map = { + 'extension': {'key': 'extension', 'type': 'str'}, + 'script_processor': {'key': 'scriptProcessor', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HandlerMapping, self).__init__(**kwargs) + self.extension = kwargs.get('extension', None) + self.script_processor = kwargs.get('script_processor', None) + self.arguments = kwargs.get('arguments', None) + + +class HostingEnvironmentDeploymentInfo(msrest.serialization.Model): + """Information needed to create resources on an App Service Environment. + + :param name: Name of the App Service Environment. + :type name: str + :param location: Location of the App Service Environment. + :type location: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + + +class HostingEnvironmentDiagnostics(msrest.serialization.Model): + """Diagnostics for an App Service Environment. + + :param name: Name/identifier of the diagnostics. + :type name: str + :param diagnostics_output: Diagnostics output. + :type diagnostics_output: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'diagnostics_output': {'key': 'diagnosticsOutput', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.diagnostics_output = kwargs.get('diagnostics_output', None) + + +class HostingEnvironmentProfile(msrest.serialization.Model): + """Specification for an App Service Environment to use for this resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID of the App Service Environment. + :type id: str + :ivar name: Name of the App Service Environment. + :vartype name: str + :ivar type: Resource type of the App Service Environment. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.type = None + + +class HostKeys(msrest.serialization.Model): + """Functions host level keys. + + :param master_key: Secret key. + :type master_key: str + :param function_keys: Host level function keys. + :type function_keys: dict[str, str] + :param system_keys: System keys. + :type system_keys: dict[str, str] + """ + + _attribute_map = { + 'master_key': {'key': 'masterKey', 'type': 'str'}, + 'function_keys': {'key': 'functionKeys', 'type': '{str}'}, + 'system_keys': {'key': 'systemKeys', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(HostKeys, self).__init__(**kwargs) + self.master_key = kwargs.get('master_key', None) + self.function_keys = kwargs.get('function_keys', None) + self.system_keys = kwargs.get('system_keys', None) + + +class HostName(msrest.serialization.Model): + """Details of a hostname derived from a domain. + + :param name: Name of the hostname. + :type name: str + :param site_names: List of apps the hostname is assigned to. This list will have more than one + app only if the hostname is pointing to a Traffic Manager. + :type site_names: list[str] + :param azure_resource_name: Name of the Azure resource the hostname is assigned to. If it is + assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the + app name. + :type azure_resource_name: str + :param azure_resource_type: Type of the Azure resource the hostname is assigned to. Possible + values include: "Website", "TrafficManager". + :type azure_resource_type: str or ~azure.mgmt.web.v2020_12_01.models.AzureResourceType + :param custom_host_name_dns_record_type: Type of the DNS record. Possible values include: + "CName", "A". + :type custom_host_name_dns_record_type: str or + ~azure.mgmt.web.v2020_12_01.models.CustomHostNameDnsRecordType + :param host_name_type: Type of the hostname. Possible values include: "Verified", "Managed". + :type host_name_type: str or ~azure.mgmt.web.v2020_12_01.models.HostNameType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'site_names': {'key': 'siteNames', 'type': '[str]'}, + 'azure_resource_name': {'key': 'azureResourceName', 'type': 'str'}, + 'azure_resource_type': {'key': 'azureResourceType', 'type': 'str'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'str'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HostName, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.site_names = kwargs.get('site_names', None) + self.azure_resource_name = kwargs.get('azure_resource_name', None) + self.azure_resource_type = kwargs.get('azure_resource_type', None) + self.custom_host_name_dns_record_type = kwargs.get('custom_host_name_dns_record_type', None) + self.host_name_type = kwargs.get('host_name_type', None) + + +class HostNameBinding(ProxyOnlyResource): + """A hostname binding object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param site_name: App Service app name. + :type site_name: str + :param domain_id: Fully qualified ARM domain resource URI. + :type domain_id: str + :param azure_resource_name: Azure resource name. + :type azure_resource_name: str + :param azure_resource_type: Azure resource type. Possible values include: "Website", + "TrafficManager". + :type azure_resource_type: str or ~azure.mgmt.web.v2020_12_01.models.AzureResourceType + :param custom_host_name_dns_record_type: Custom DNS record type. Possible values include: + "CName", "A". + :type custom_host_name_dns_record_type: str or + ~azure.mgmt.web.v2020_12_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: "Verified", "Managed". + :type host_name_type: str or ~azure.mgmt.web.v2020_12_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: "Disabled", "SniEnabled", + "IpBasedEnabled". + :type ssl_state: str or ~azure.mgmt.web.v2020_12_01.models.SslState + :param thumbprint: SSL certificate thumbprint. + :type thumbprint: str + :ivar virtual_ip: Virtual IP address assigned to the hostname if IP based SSL is enabled. + :vartype virtual_ip: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_ip': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'site_name': {'key': 'properties.siteName', 'type': 'str'}, + 'domain_id': {'key': 'properties.domainId', 'type': 'str'}, + 'azure_resource_name': {'key': 'properties.azureResourceName', 'type': 'str'}, + 'azure_resource_type': {'key': 'properties.azureResourceType', 'type': 'str'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'str'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'str'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HostNameBinding, self).__init__(**kwargs) + self.site_name = kwargs.get('site_name', None) + self.domain_id = kwargs.get('domain_id', None) + self.azure_resource_name = kwargs.get('azure_resource_name', None) + self.azure_resource_type = kwargs.get('azure_resource_type', None) + self.custom_host_name_dns_record_type = kwargs.get('custom_host_name_dns_record_type', None) + self.host_name_type = kwargs.get('host_name_type', None) + self.ssl_state = kwargs.get('ssl_state', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.virtual_ip = None + + +class HostNameBindingCollection(msrest.serialization.Model): + """Collection of hostname bindings. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.HostNameBinding] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HostNameBinding]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HostNameBindingCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class HostNameSslState(msrest.serialization.Model): + """SSL-enabled hostname. + + :param name: Hostname. + :type name: str + :param ssl_state: SSL type. Possible values include: "Disabled", "SniEnabled", + "IpBasedEnabled". + :type ssl_state: str or ~azure.mgmt.web.v2020_12_01.models.SslState + :param virtual_ip: Virtual IP address assigned to the hostname if IP based SSL is enabled. + :type virtual_ip: str + :param thumbprint: SSL certificate thumbprint. + :type thumbprint: str + :param to_update: Set to :code:`true` to update existing hostname. + :type to_update: bool + :param host_type: Indicates whether the hostname is a standard or repository hostname. Possible + values include: "Standard", "Repository". + :type host_type: str or ~azure.mgmt.web.v2020_12_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'str'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HostNameSslState, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.ssl_state = kwargs.get('ssl_state', None) + self.virtual_ip = kwargs.get('virtual_ip', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.to_update = kwargs.get('to_update', None) + self.host_type = kwargs.get('host_type', None) + + +class HttpLogsConfig(msrest.serialization.Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: ~azure.mgmt.web.v2020_12_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: ~azure.mgmt.web.v2020_12_01.models.AzureBlobStorageHttpLogsConfig + """ + + _attribute_map = { + 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, + 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, + } + + def __init__( + self, + **kwargs + ): + super(HttpLogsConfig, self).__init__(**kwargs) + self.file_system = kwargs.get('file_system', None) + self.azure_blob_storage = kwargs.get('azure_blob_storage', None) + + +class HttpSettings(ProxyOnlyResource): + """HttpSettings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param require_https: + :type require_https: bool + :param routes: + :type routes: ~azure.mgmt.web.v2020_12_01.models.HttpSettingsRoutes + :param forward_proxy: + :type forward_proxy: ~azure.mgmt.web.v2020_12_01.models.ForwardProxy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'require_https': {'key': 'properties.requireHttps', 'type': 'bool'}, + 'routes': {'key': 'properties.routes', 'type': 'HttpSettingsRoutes'}, + 'forward_proxy': {'key': 'properties.forwardProxy', 'type': 'ForwardProxy'}, + } + + def __init__( + self, + **kwargs + ): + super(HttpSettings, self).__init__(**kwargs) + self.require_https = kwargs.get('require_https', None) + self.routes = kwargs.get('routes', None) + self.forward_proxy = kwargs.get('forward_proxy', None) + + +class HttpSettingsRoutes(ProxyOnlyResource): + """HttpSettingsRoutes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param api_prefix: + :type api_prefix: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'api_prefix': {'key': 'properties.apiPrefix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HttpSettingsRoutes, self).__init__(**kwargs) + self.api_prefix = kwargs.get('api_prefix', None) + + +class HybridConnection(ProxyOnlyResource): + """Hybrid Connection contract. This is used to configure a Hybrid Connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param service_bus_namespace: The name of the Service Bus namespace. + :type service_bus_namespace: str + :param relay_name: The name of the Service Bus relay. + :type relay_name: str + :param relay_arm_uri: The ARM URI to the Service Bus relay. + :type relay_arm_uri: str + :param hostname: The hostname of the endpoint. + :type hostname: str + :param port: The port of the endpoint. + :type port: int + :param send_key_name: The name of the Service Bus key which has Send permissions. This is used + to authenticate to Service Bus. + :type send_key_name: str + :param send_key_value: The value of the Service Bus key. This is used to authenticate to + Service Bus. In ARM this key will not be returned + normally, use the POST /listKeys API instead. + :type send_key_value: str + :param service_bus_suffix: The suffix for the service bus endpoint. By default this is + .servicebus.windows.net. + :type service_bus_suffix: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_bus_namespace': {'key': 'properties.serviceBusNamespace', 'type': 'str'}, + 'relay_name': {'key': 'properties.relayName', 'type': 'str'}, + 'relay_arm_uri': {'key': 'properties.relayArmUri', 'type': 'str'}, + 'hostname': {'key': 'properties.hostname', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'send_key_name': {'key': 'properties.sendKeyName', 'type': 'str'}, + 'send_key_value': {'key': 'properties.sendKeyValue', 'type': 'str'}, + 'service_bus_suffix': {'key': 'properties.serviceBusSuffix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnection, self).__init__(**kwargs) + self.service_bus_namespace = kwargs.get('service_bus_namespace', None) + self.relay_name = kwargs.get('relay_name', None) + self.relay_arm_uri = kwargs.get('relay_arm_uri', None) + self.hostname = kwargs.get('hostname', None) + self.port = kwargs.get('port', None) + self.send_key_name = kwargs.get('send_key_name', None) + self.send_key_value = kwargs.get('send_key_value', None) + self.service_bus_suffix = kwargs.get('service_bus_suffix', None) + + +class HybridConnectionCollection(msrest.serialization.Model): + """Collection of hostname bindings. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.HybridConnection] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HybridConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class HybridConnectionKey(ProxyOnlyResource): + """Hybrid Connection key contract. This has the send key name and value for a Hybrid Connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar send_key_name: The name of the send key. + :vartype send_key_name: str + :ivar send_key_value: The value of the send key. + :vartype send_key_value: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'send_key_name': {'readonly': True}, + 'send_key_value': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'send_key_name': {'key': 'properties.sendKeyName', 'type': 'str'}, + 'send_key_value': {'key': 'properties.sendKeyValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionKey, self).__init__(**kwargs) + self.send_key_name = None + self.send_key_value = None + + +class HybridConnectionLimits(ProxyOnlyResource): + """Hybrid Connection limits contract. This is used to return the plan limits of Hybrid Connections. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar current: The current number of Hybrid Connections. + :vartype current: int + :ivar maximum: The maximum number of Hybrid Connections allowed. + :vartype maximum: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'current': {'readonly': True}, + 'maximum': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'current': {'key': 'properties.current', 'type': 'int'}, + 'maximum': {'key': 'properties.maximum', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionLimits, self).__init__(**kwargs) + self.current = None + self.maximum = None + + +class Identifier(ProxyOnlyResource): + """A domain specific resource identifier. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param value: String representation of the identity. + :type value: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Identifier, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class IdentifierCollection(msrest.serialization.Model): + """Collection of identifiers. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Identifier] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Identifier]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IdentifierCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class IdentityProviders(ProxyOnlyResource): + """IdentityProviders. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param azure_active_directory: + :type azure_active_directory: ~azure.mgmt.web.v2020_12_01.models.AzureActiveDirectory + :param facebook: + :type facebook: ~azure.mgmt.web.v2020_12_01.models.Facebook + :param git_hub: + :type git_hub: ~azure.mgmt.web.v2020_12_01.models.GitHub + :param google: + :type google: ~azure.mgmt.web.v2020_12_01.models.Google + :param legacy_microsoft_account: + :type legacy_microsoft_account: ~azure.mgmt.web.v2020_12_01.models.LegacyMicrosoftAccount + :param twitter: + :type twitter: ~azure.mgmt.web.v2020_12_01.models.Twitter + :param apple: + :type apple: ~azure.mgmt.web.v2020_12_01.models.Apple + :param azure_static_web_apps: + :type azure_static_web_apps: ~azure.mgmt.web.v2020_12_01.models.AzureStaticWebApps + :param custom_open_id_connect_providers: Dictionary of :code:``. + :type custom_open_id_connect_providers: dict[str, + ~azure.mgmt.web.v2020_12_01.models.CustomOpenIdConnectProvider] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_active_directory': {'key': 'properties.azureActiveDirectory', 'type': 'AzureActiveDirectory'}, + 'facebook': {'key': 'properties.facebook', 'type': 'Facebook'}, + 'git_hub': {'key': 'properties.gitHub', 'type': 'GitHub'}, + 'google': {'key': 'properties.google', 'type': 'Google'}, + 'legacy_microsoft_account': {'key': 'properties.legacyMicrosoftAccount', 'type': 'LegacyMicrosoftAccount'}, + 'twitter': {'key': 'properties.twitter', 'type': 'Twitter'}, + 'apple': {'key': 'properties.apple', 'type': 'Apple'}, + 'azure_static_web_apps': {'key': 'properties.azureStaticWebApps', 'type': 'AzureStaticWebApps'}, + 'custom_open_id_connect_providers': {'key': 'properties.customOpenIdConnectProviders', 'type': '{CustomOpenIdConnectProvider}'}, + } + + def __init__( + self, + **kwargs + ): + super(IdentityProviders, self).__init__(**kwargs) + self.azure_active_directory = kwargs.get('azure_active_directory', None) + self.facebook = kwargs.get('facebook', None) + self.git_hub = kwargs.get('git_hub', None) + self.google = kwargs.get('google', None) + self.legacy_microsoft_account = kwargs.get('legacy_microsoft_account', None) + self.twitter = kwargs.get('twitter', None) + self.apple = kwargs.get('apple', None) + self.azure_static_web_apps = kwargs.get('azure_static_web_apps', None) + self.custom_open_id_connect_providers = kwargs.get('custom_open_id_connect_providers', None) + + +class InboundEnvironmentEndpoint(msrest.serialization.Model): + """The IP Addresses and Ports that require inbound network access to and within the subnet of the App Service Environment. + + :param description: Short text describing the purpose of the network traffic. + :type description: str + :param endpoints: The IP addresses that network traffic will originate from in cidr notation. + :type endpoints: list[str] + :param ports: The ports that network traffic will arrive to the App Service Environment at. + :type ports: list[str] + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[str]'}, + 'ports': {'key': 'ports', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(InboundEnvironmentEndpoint, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.endpoints = kwargs.get('endpoints', None) + self.ports = kwargs.get('ports', None) + + +class InboundEnvironmentEndpointCollection(msrest.serialization.Model): + """Collection of Inbound Environment Endpoints. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.InboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(InboundEnvironmentEndpointCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class IpSecurityRestriction(msrest.serialization.Model): + """IP security restriction on an app. + + :param ip_address: IP address the security restriction is valid for. + It can be in form of pure ipv4 address (required SubnetMask property) or + CIDR notation such as ipv4/mask (leading bit match). For CIDR, + SubnetMask property must not be specified. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the restriction is valid for. + :type subnet_mask: str + :param vnet_subnet_resource_id: Virtual network resource id. + :type vnet_subnet_resource_id: str + :param vnet_traffic_tag: (internal) Vnet traffic tag. + :type vnet_traffic_tag: int + :param subnet_traffic_tag: (internal) Subnet traffic tag. + :type subnet_traffic_tag: int + :param action: Allow or Deny access for this IP range. + :type action: str + :param tag: Defines what this IP filter will be used for. This is to support IP filtering on + proxies. Possible values include: "Default", "XffProxy", "ServiceTag". + :type tag: str or ~azure.mgmt.web.v2020_12_01.models.IpFilterTag + :param priority: Priority of IP restriction rule. + :type priority: int + :param name: IP restriction rule name. + :type name: str + :param description: IP restriction rule description. + :type description: str + :param headers: IP restriction rule headers. + X-Forwarded-Host + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). + The matching logic is .. + + + * If the property is null or empty (default), all hosts(or lack of) are allowed. + * A value is compared using ordinal-ignore-case (excluding port number). + * Subdomain wildcards are permitted but don't match the root domain. For example, + *.contoso.com matches the subdomain foo.contoso.com + but not the root domain contoso.com or multi-level foo.bar.contoso.com + * Unicode host names are allowed but are converted to Punycode for matching. + + X-Forwarded-For + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). + The matching logic is .. + + + * If the property is null or empty (default), any forwarded-for chains (or lack of) are + allowed. + * If any address (excluding port number) in the chain (comma separated) matches the CIDR + defined by the property. + + X-Azure-FDID and X-FD-HealthProbe. + The matching logic is exact match. + :type headers: dict[str, list[str]] + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, + 'vnet_subnet_resource_id': {'key': 'vnetSubnetResourceId', 'type': 'str'}, + 'vnet_traffic_tag': {'key': 'vnetTrafficTag', 'type': 'int'}, + 'subnet_traffic_tag': {'key': 'subnetTrafficTag', 'type': 'int'}, + 'action': {'key': 'action', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + } + + def __init__( + self, + **kwargs + ): + super(IpSecurityRestriction, self).__init__(**kwargs) + self.ip_address = kwargs.get('ip_address', None) + self.subnet_mask = kwargs.get('subnet_mask', None) + self.vnet_subnet_resource_id = kwargs.get('vnet_subnet_resource_id', None) + self.vnet_traffic_tag = kwargs.get('vnet_traffic_tag', None) + self.subnet_traffic_tag = kwargs.get('subnet_traffic_tag', None) + self.action = kwargs.get('action', None) + self.tag = kwargs.get('tag', None) + self.priority = kwargs.get('priority', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.headers = kwargs.get('headers', None) + + +class JwtClaimChecks(ProxyOnlyResource): + """JwtClaimChecks. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param allowed_groups: + :type allowed_groups: list[str] + :param allowed_client_applications: + :type allowed_client_applications: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allowed_groups': {'key': 'properties.allowedGroups', 'type': '[str]'}, + 'allowed_client_applications': {'key': 'properties.allowedClientApplications', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(JwtClaimChecks, self).__init__(**kwargs) + self.allowed_groups = kwargs.get('allowed_groups', None) + self.allowed_client_applications = kwargs.get('allowed_client_applications', None) + + +class KeyInfo(msrest.serialization.Model): + """Function key info. + + :param name: Key name. + :type name: str + :param value: Key value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class KeyValuePairStringObject(msrest.serialization.Model): + """KeyValuePairStringObject. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar key: + :vartype key: str + :ivar value: Any object. + :vartype value: object + """ + + _validation = { + 'key': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyValuePairStringObject, self).__init__(**kwargs) + self.key = None + self.value = None + + +class KubeEnvironmentProfile(msrest.serialization.Model): + """Specification for a Kubernetes Environment to use for this resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID of the Kubernetes Environment. + :type id: str + :ivar name: Name of the Kubernetes Environment. + :vartype name: str + :ivar type: Resource type of the Kubernetes Environment. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KubeEnvironmentProfile, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.type = None + + +class LegacyMicrosoftAccount(ProxyOnlyResource): + """LegacyMicrosoftAccount. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.LoginScopes + :param validation: + :type validation: ~azure.mgmt.web.v2020_12_01.models.AllowedAudiencesValidation + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'ClientRegistration'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + 'validation': {'key': 'properties.validation', 'type': 'AllowedAudiencesValidation'}, + } + + def __init__( + self, + **kwargs + ): + super(LegacyMicrosoftAccount, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.registration = kwargs.get('registration', None) + self.login = kwargs.get('login', None) + self.validation = kwargs.get('validation', None) + + +class LinuxJavaContainerSettings(msrest.serialization.Model): + """Linux Java Container settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar java11_runtime: Java 11 version (runtime only). + :vartype java11_runtime: str + :ivar java8_runtime: Java 8 version (runtime only). + :vartype java8_runtime: str + :ivar is_preview: :code:`true` if the stack is in preview; otherwise, + :code:`false`. + :vartype is_preview: bool + :ivar is_deprecated: :code:`true` if the stack is deprecated; otherwise, + :code:`false`. + :vartype is_deprecated: bool + :ivar is_hidden: :code:`true` if the stack should be hidden; otherwise, + :code:`false`. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: ~datetime.datetime + :ivar is_auto_update: :code:`true` if the stack version is auto-updated; + otherwise, :code:`false`. + :vartype is_auto_update: bool + :ivar is_early_access: :code:`true` if the minor version is early-access; + otherwise, :code:`false`. + :vartype is_early_access: bool + """ + + _validation = { + 'java11_runtime': {'readonly': True}, + 'java8_runtime': {'readonly': True}, + 'is_preview': {'readonly': True}, + 'is_deprecated': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'end_of_life_date': {'readonly': True}, + 'is_auto_update': {'readonly': True}, + 'is_early_access': {'readonly': True}, + } + + _attribute_map = { + 'java11_runtime': {'key': 'java11Runtime', 'type': 'str'}, + 'java8_runtime': {'key': 'java8Runtime', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'is_auto_update': {'key': 'isAutoUpdate', 'type': 'bool'}, + 'is_early_access': {'key': 'isEarlyAccess', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(LinuxJavaContainerSettings, self).__init__(**kwargs) + self.java11_runtime = None + self.java8_runtime = None + self.is_preview = None + self.is_deprecated = None + self.is_hidden = None + self.end_of_life_date = None + self.is_auto_update = None + self.is_early_access = None + + +class LocalizableString(msrest.serialization.Model): + """Localizable string object containing the name and a localized value. + + :param value: Non-localized name. + :type value: str + :param localized_value: Localized name. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LocalizableString, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class Login(ProxyOnlyResource): + """Login. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param routes: + :type routes: ~azure.mgmt.web.v2020_12_01.models.LoginRoutes + :param token_store: + :type token_store: ~azure.mgmt.web.v2020_12_01.models.TokenStore + :param preserve_url_fragments_for_logins: + :type preserve_url_fragments_for_logins: bool + :param allowed_external_redirect_urls: + :type allowed_external_redirect_urls: list[str] + :param cookie_expiration: + :type cookie_expiration: ~azure.mgmt.web.v2020_12_01.models.CookieExpiration + :param nonce: + :type nonce: ~azure.mgmt.web.v2020_12_01.models.Nonce + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': 'LoginRoutes'}, + 'token_store': {'key': 'properties.tokenStore', 'type': 'TokenStore'}, + 'preserve_url_fragments_for_logins': {'key': 'properties.preserveUrlFragmentsForLogins', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'cookie_expiration': {'key': 'properties.cookieExpiration', 'type': 'CookieExpiration'}, + 'nonce': {'key': 'properties.nonce', 'type': 'Nonce'}, + } + + def __init__( + self, + **kwargs + ): + super(Login, self).__init__(**kwargs) + self.routes = kwargs.get('routes', None) + self.token_store = kwargs.get('token_store', None) + self.preserve_url_fragments_for_logins = kwargs.get('preserve_url_fragments_for_logins', None) + self.allowed_external_redirect_urls = kwargs.get('allowed_external_redirect_urls', None) + self.cookie_expiration = kwargs.get('cookie_expiration', None) + self.nonce = kwargs.get('nonce', None) + + +class LoginRoutes(ProxyOnlyResource): + """LoginRoutes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param logout_endpoint: + :type logout_endpoint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'logout_endpoint': {'key': 'properties.logoutEndpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoginRoutes, self).__init__(**kwargs) + self.logout_endpoint = kwargs.get('logout_endpoint', None) + + +class LoginScopes(ProxyOnlyResource): + """LoginScopes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param scopes: + :type scopes: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(LoginScopes, self).__init__(**kwargs) + self.scopes = kwargs.get('scopes', None) + + +class LogSpecification(msrest.serialization.Model): + """Log Definition of a single resource metric. + + :param name: + :type name: str + :param display_name: + :type display_name: str + :param blob_duration: + :type blob_duration: str + :param log_filter_pattern: + :type log_filter_pattern: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'log_filter_pattern': {'key': 'logFilterPattern', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + self.log_filter_pattern = kwargs.get('log_filter_pattern', None) + + +class ManagedServiceIdentity(msrest.serialization.Model): + """Managed service identity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: Type of managed service identity. Possible values include: "SystemAssigned", + "UserAssigned", "SystemAssigned, UserAssigned", "None". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentityType + :ivar tenant_id: Tenant of managed service identity. + :vartype tenant_id: str + :ivar principal_id: Principal Id of managed service identity. + :vartype principal_id: str + :param user_assigned_identities: The list of user assigned identities associated with the + resource. The user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + :type user_assigned_identities: dict[str, + ~azure.mgmt.web.v2020_12_01.models.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties}'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.tenant_id = None + self.principal_id = None + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class MetricAvailability(msrest.serialization.Model): + """Retention policy of a resource metric. + + :param time_grain: + :type time_grain: str + :param blob_duration: + :type blob_duration: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class MetricSpecification(msrest.serialization.Model): + """Definition of a single resource metric. + + :param name: + :type name: str + :param display_name: + :type display_name: str + :param display_description: + :type display_description: str + :param unit: + :type unit: str + :param aggregation_type: + :type aggregation_type: str + :param supports_instance_level_aggregation: + :type supports_instance_level_aggregation: bool + :param enable_regional_mdm_account: + :type enable_regional_mdm_account: bool + :param source_mdm_account: + :type source_mdm_account: str + :param source_mdm_namespace: + :type source_mdm_namespace: str + :param metric_filter_pattern: + :type metric_filter_pattern: str + :param fill_gap_with_zero: + :type fill_gap_with_zero: bool + :param is_internal: + :type is_internal: bool + :param dimensions: + :type dimensions: list[~azure.mgmt.web.v2020_12_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: list[~azure.mgmt.web.v2020_12_01.models.MetricAvailability] + :param supported_time_grain_types: + :type supported_time_grain_types: list[str] + :param supported_aggregation_types: + :type supported_aggregation_types: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supports_instance_level_aggregation': {'key': 'supportsInstanceLevelAggregation', 'type': 'bool'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'is_internal': {'key': 'isInternal', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'category': {'key': 'category', 'type': 'str'}, + 'availabilities': {'key': 'availabilities', 'type': '[MetricAvailability]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.supports_instance_level_aggregation = kwargs.get('supports_instance_level_aggregation', None) + self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) + self.source_mdm_account = kwargs.get('source_mdm_account', None) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) + self.metric_filter_pattern = kwargs.get('metric_filter_pattern', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.is_internal = kwargs.get('is_internal', None) + self.dimensions = kwargs.get('dimensions', None) + self.category = kwargs.get('category', None) + self.availabilities = kwargs.get('availabilities', None) + self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + + +class MigrateMySqlRequest(ProxyOnlyResource): + """MySQL migration request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param connection_string: Connection string to the remote MySQL database. + :type connection_string: str + :param migration_type: The type of migration operation to be done. Possible values include: + "LocalToRemote", "RemoteToLocal". + :type migration_type: str or ~azure.mgmt.web.v2020_12_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'migration_type': {'key': 'properties.migrationType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlRequest, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.migration_type = kwargs.get('migration_type', None) + + +class MigrateMySqlStatus(ProxyOnlyResource): + """MySQL migration status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar migration_operation_status: Status of the migration task. Possible values include: + "InProgress", "Failed", "Succeeded", "TimedOut", "Created". + :vartype migration_operation_status: str or ~azure.mgmt.web.v2020_12_01.models.OperationStatus + :ivar operation_id: Operation ID for the migration task. + :vartype operation_id: str + :ivar local_my_sql_enabled: True if the web app has in app MySql enabled. + :vartype local_my_sql_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'migration_operation_status': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'local_my_sql_enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'migration_operation_status': {'key': 'properties.migrationOperationStatus', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlStatus, self).__init__(**kwargs) + self.migration_operation_status = None + self.operation_id = None + self.local_my_sql_enabled = None + + +class MSDeploy(ProxyOnlyResource): + """MSDeploy ARM PUT information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param package_uri: Package URI. + :type package_uri: str + :param connection_string: SQL Connection String. + :type connection_string: str + :param db_type: Database Type. + :type db_type: str + :param set_parameters_xml_file_uri: URI of MSDeploy Parameters file. Must not be set if + SetParameters is used. + :type set_parameters_xml_file_uri: str + :param set_parameters: MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + :type set_parameters: dict[str, str] + :param skip_app_data: Controls whether the MSDeploy operation skips the App_Data directory. + If set to :code:`true`, the existing App_Data directory on the destination + will not be deleted, and any App_Data directory in the source will be ignored. + Setting is :code:`false` by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation executes. + Setting is :code:`false` by default. + :type app_offline: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'package_uri': {'key': 'properties.packageUri', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'db_type': {'key': 'properties.dbType', 'type': 'str'}, + 'set_parameters_xml_file_uri': {'key': 'properties.setParametersXmlFileUri', 'type': 'str'}, + 'set_parameters': {'key': 'properties.setParameters', 'type': '{str}'}, + 'skip_app_data': {'key': 'properties.skipAppData', 'type': 'bool'}, + 'app_offline': {'key': 'properties.appOffline', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MSDeploy, self).__init__(**kwargs) + self.package_uri = kwargs.get('package_uri', None) + self.connection_string = kwargs.get('connection_string', None) + self.db_type = kwargs.get('db_type', None) + self.set_parameters_xml_file_uri = kwargs.get('set_parameters_xml_file_uri', None) + self.set_parameters = kwargs.get('set_parameters', None) + self.skip_app_data = kwargs.get('skip_app_data', None) + self.app_offline = kwargs.get('app_offline', None) + + +class MSDeployLog(ProxyOnlyResource): + """MSDeploy log. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar entries: List of log entry messages. + :vartype entries: list[~azure.mgmt.web.v2020_12_01.models.MSDeployLogEntry] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'entries': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entries': {'key': 'properties.entries', 'type': '[MSDeployLogEntry]'}, + } + + def __init__( + self, + **kwargs + ): + super(MSDeployLog, self).__init__(**kwargs) + self.entries = None + + +class MSDeployLogEntry(msrest.serialization.Model): + """MSDeploy log entry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar time: Timestamp of log entry. + :vartype time: ~datetime.datetime + :ivar type: Log entry type. Possible values include: "Message", "Warning", "Error". + :vartype type: str or ~azure.mgmt.web.v2020_12_01.models.MSDeployLogEntryType + :ivar message: Log entry message. + :vartype message: str + """ + + _validation = { + 'time': {'readonly': True}, + 'type': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MSDeployLogEntry, self).__init__(**kwargs) + self.time = None + self.type = None + self.message = None + + +class MSDeployStatus(ProxyOnlyResource): + """MSDeploy ARM response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar deployer: Username of deployer. + :vartype deployer: str + :ivar provisioning_state: Provisioning state. Possible values include: "accepted", "running", + "succeeded", "failed", "canceled". + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_12_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: End time of deploy operation. + :vartype end_time: ~datetime.datetime + :ivar complete: Whether the deployment operation has completed. + :vartype complete: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'deployer': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deployer': {'key': 'properties.deployer', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'complete': {'key': 'properties.complete', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MSDeployStatus, self).__init__(**kwargs) + self.deployer = None + self.provisioning_state = None + self.start_time = None + self.end_time = None + self.complete = None + + +class NameIdentifier(msrest.serialization.Model): + """Identifies an object. + + :param name: Name of the object. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NameIdentifier, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class NameIdentifierCollection(msrest.serialization.Model): + """Collection of domain name identifiers. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.NameIdentifier] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NameIdentifier]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NameIdentifierCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class NameValuePair(msrest.serialization.Model): + """Name value pair. + + :param name: Pair name. + :type name: str + :param value: Pair value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NameValuePair, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class NetworkFeatures(ProxyOnlyResource): + """Full view of network features for an app (presently VNET integration and Hybrid Connections). + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar virtual_network_name: The Virtual Network name. + :vartype virtual_network_name: str + :ivar virtual_network_connection: The Virtual Network summary view. + :vartype virtual_network_connection: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: list[~azure.mgmt.web.v2020_12_01.models.HybridConnection] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_name': {'readonly': True}, + 'virtual_network_connection': {'readonly': True}, + 'hybrid_connections': {'readonly': True}, + 'hybrid_connections_v2': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_name': {'key': 'properties.virtualNetworkName', 'type': 'str'}, + 'virtual_network_connection': {'key': 'properties.virtualNetworkConnection', 'type': 'VnetInfo'}, + 'hybrid_connections': {'key': 'properties.hybridConnections', 'type': '[RelayServiceConnectionEntity]'}, + 'hybrid_connections_v2': {'key': 'properties.hybridConnectionsV2', 'type': '[HybridConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkFeatures, self).__init__(**kwargs) + self.virtual_network_name = None + self.virtual_network_connection = None + self.hybrid_connections = None + self.hybrid_connections_v2 = None + + +class NetworkTrace(msrest.serialization.Model): + """Network trace. + + :param path: Local file path for the captured network trace file. + :type path: str + :param status: Current status of the network trace operation, same as Operation.Status + (InProgress/Succeeded/Failed). + :type status: str + :param message: Detailed message of a network trace operation, e.g. error message in case of + failure. + :type message: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkTrace, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.status = kwargs.get('status', None) + self.message = kwargs.get('message', None) + + +class Nonce(ProxyOnlyResource): + """Nonce. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param validate_nonce: + :type validate_nonce: bool + :param nonce_expiration_interval: + :type nonce_expiration_interval: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'validate_nonce': {'key': 'properties.validateNonce', 'type': 'bool'}, + 'nonce_expiration_interval': {'key': 'properties.nonceExpirationInterval', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Nonce, self).__init__(**kwargs) + self.validate_nonce = kwargs.get('validate_nonce', None) + self.nonce_expiration_interval = kwargs.get('nonce_expiration_interval', None) + + +class OpenIdConnectClientCredential(ProxyOnlyResource): + """OpenIdConnectClientCredential. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar method: Default value: "ClientSecretPost". + :vartype method: str + :param client_secret_setting_name: + :type client_secret_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'method': {'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'method': {'key': 'properties.method', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + method = "ClientSecretPost" + + def __init__( + self, + **kwargs + ): + super(OpenIdConnectClientCredential, self).__init__(**kwargs) + self.client_secret_setting_name = kwargs.get('client_secret_setting_name', None) + + +class OpenIdConnectConfig(ProxyOnlyResource): + """OpenIdConnectConfig. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param authorization_endpoint: + :type authorization_endpoint: str + :param token_endpoint: + :type token_endpoint: str + :param issuer: + :type issuer: str + :param certification_uri: + :type certification_uri: str + :param well_known_open_id_configuration: + :type well_known_open_id_configuration: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'authorization_endpoint': {'key': 'properties.authorizationEndpoint', 'type': 'str'}, + 'token_endpoint': {'key': 'properties.tokenEndpoint', 'type': 'str'}, + 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'certification_uri': {'key': 'properties.certificationUri', 'type': 'str'}, + 'well_known_open_id_configuration': {'key': 'properties.wellKnownOpenIdConfiguration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OpenIdConnectConfig, self).__init__(**kwargs) + self.authorization_endpoint = kwargs.get('authorization_endpoint', None) + self.token_endpoint = kwargs.get('token_endpoint', None) + self.issuer = kwargs.get('issuer', None) + self.certification_uri = kwargs.get('certification_uri', None) + self.well_known_open_id_configuration = kwargs.get('well_known_open_id_configuration', None) + + +class OpenIdConnectLogin(ProxyOnlyResource): + """OpenIdConnectLogin. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param name_claim_type: + :type name_claim_type: str + :param scopes: + :type scopes: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name_claim_type': {'key': 'properties.nameClaimType', 'type': 'str'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(OpenIdConnectLogin, self).__init__(**kwargs) + self.name_claim_type = kwargs.get('name_claim_type', None) + self.scopes = kwargs.get('scopes', None) + + +class OpenIdConnectRegistration(ProxyOnlyResource): + """OpenIdConnectRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param client_id: + :type client_id: str + :param client_credential: + :type client_credential: ~azure.mgmt.web.v2020_12_01.models.OpenIdConnectClientCredential + :param open_id_connect_configuration: + :type open_id_connect_configuration: ~azure.mgmt.web.v2020_12_01.models.OpenIdConnectConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_credential': {'key': 'properties.clientCredential', 'type': 'OpenIdConnectClientCredential'}, + 'open_id_connect_configuration': {'key': 'properties.openIdConnectConfiguration', 'type': 'OpenIdConnectConfig'}, + } + + def __init__( + self, + **kwargs + ): + super(OpenIdConnectRegistration, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_credential = kwargs.get('client_credential', None) + self.open_id_connect_configuration = kwargs.get('open_id_connect_configuration', None) + + +class Operation(msrest.serialization.Model): + """An operation on a resource. + + :param id: Operation ID. + :type id: str + :param name: Operation name. + :type name: str + :param status: The current status of the operation. Possible values include: "InProgress", + "Failed", "Succeeded", "TimedOut", "Created". + :type status: str or ~azure.mgmt.web.v2020_12_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2020_12_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: ~datetime.datetime + :param modified_time: Time when operation has been updated. + :type modified_time: ~datetime.datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: ~datetime.datetime + :param geo_master_operation_id: Applicable only for stamp operation ids. + :type geo_master_operation_id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ErrorEntity]'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'modified_time': {'key': 'modifiedTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'expirationTime', 'type': 'iso-8601'}, + 'geo_master_operation_id': {'key': 'geoMasterOperationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + self.errors = kwargs.get('errors', None) + self.created_time = kwargs.get('created_time', None) + self.modified_time = kwargs.get('modified_time', None) + self.expiration_time = kwargs.get('expiration_time', None) + self.geo_master_operation_id = kwargs.get('geo_master_operation_id', None) + + +class OutboundEnvironmentEndpoint(msrest.serialization.Model): + """Endpoints accessed for a common purpose that the App Service Environment requires outbound network access to. + + :param category: The type of service accessed by the App Service Environment, e.g., Azure + Storage, Azure SQL Database, and Azure Active Directory. + :type category: str + :param endpoints: The endpoints that the App Service Environment reaches the service at. + :type endpoints: list[~azure.mgmt.web.v2020_12_01.models.EndpointDependency] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.endpoints = kwargs.get('endpoints', None) + + +class OutboundEnvironmentEndpointCollection(msrest.serialization.Model): + """Collection of Outbound Environment Endpoints. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundEnvironmentEndpointCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class PerfMonCounterCollection(msrest.serialization.Model): + """Collection of performance monitor counters. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.PerfMonResponse] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PerfMonResponse]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PerfMonCounterCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class PerfMonResponse(msrest.serialization.Model): + """Performance monitor API response. + + :param code: The response code. + :type code: str + :param message: The message. + :type message: str + :param data: The performance monitor counters. + :type data: ~azure.mgmt.web.v2020_12_01.models.PerfMonSet + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'PerfMonSet'}, + } + + def __init__( + self, + **kwargs + ): + super(PerfMonResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.data = kwargs.get('data', None) + + +class PerfMonSample(msrest.serialization.Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: ~datetime.datetime + :param instance_name: Name of the server on which the measurement is made. + :type instance_name: str + :param value: Value of counter at a certain time. + :type value: float + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'instance_name': {'key': 'instanceName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(PerfMonSample, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + self.instance_name = kwargs.get('instance_name', None) + self.value = kwargs.get('value', None) + + +class PerfMonSet(msrest.serialization.Model): + """Metric information. + + :param name: Unique key name of the counter. + :type name: str + :param start_time: Start time of the period. + :type start_time: ~datetime.datetime + :param end_time: End time of the period. + :type end_time: ~datetime.datetime + :param time_grain: Presented time grain. + :type time_grain: str + :param values: Collection of workers that are active during this time. + :type values: list[~azure.mgmt.web.v2020_12_01.models.PerfMonSample] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[PerfMonSample]'}, + } + + def __init__( + self, + **kwargs + ): + super(PerfMonSet, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.time_grain = kwargs.get('time_grain', None) + self.values = kwargs.get('values', None) + + +class PremierAddOn(Resource): + """Premier add-on. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: Premier add on SKU. + :type sku: str + :param product: Premier add on Product. + :type product: str + :param vendor: Premier add on Vendor. + :type vendor: str + :param marketplace_publisher: Premier add on Marketplace publisher. + :type marketplace_publisher: str + :param marketplace_offer: Premier add on Marketplace offer. + :type marketplace_offer: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, + 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PremierAddOn, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.product = kwargs.get('product', None) + self.vendor = kwargs.get('vendor', None) + self.marketplace_publisher = kwargs.get('marketplace_publisher', None) + self.marketplace_offer = kwargs.get('marketplace_offer', None) + + +class PremierAddOnOffer(ProxyOnlyResource): + """Premier add-on offer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param sku: Premier add on SKU. + :type sku: str + :param product: Premier add on offer Product. + :type product: str + :param vendor: Premier add on offer Vendor. + :type vendor: str + :param promo_code_required: :code:`true` if promotion code is required; otherwise, + :code:`false`. + :type promo_code_required: bool + :param quota: Premier add on offer Quota. + :type quota: int + :param web_hosting_plan_restrictions: App Service plans this offer is restricted to. Possible + values include: "None", "Free", "Shared", "Basic", "Standard", "Premium". + :type web_hosting_plan_restrictions: str or + ~azure.mgmt.web.v2020_12_01.models.AppServicePlanRestrictions + :param privacy_policy_url: Privacy policy URL. + :type privacy_policy_url: str + :param legal_terms_url: Legal terms URL. + :type legal_terms_url: str + :param marketplace_publisher: Marketplace publisher. + :type marketplace_publisher: str + :param marketplace_offer: Marketplace offer. + :type marketplace_offer: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'promo_code_required': {'key': 'properties.promoCodeRequired', 'type': 'bool'}, + 'quota': {'key': 'properties.quota', 'type': 'int'}, + 'web_hosting_plan_restrictions': {'key': 'properties.webHostingPlanRestrictions', 'type': 'str'}, + 'privacy_policy_url': {'key': 'properties.privacyPolicyUrl', 'type': 'str'}, + 'legal_terms_url': {'key': 'properties.legalTermsUrl', 'type': 'str'}, + 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, + 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PremierAddOnOffer, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.product = kwargs.get('product', None) + self.vendor = kwargs.get('vendor', None) + self.promo_code_required = kwargs.get('promo_code_required', None) + self.quota = kwargs.get('quota', None) + self.web_hosting_plan_restrictions = kwargs.get('web_hosting_plan_restrictions', None) + self.privacy_policy_url = kwargs.get('privacy_policy_url', None) + self.legal_terms_url = kwargs.get('legal_terms_url', None) + self.marketplace_publisher = kwargs.get('marketplace_publisher', None) + self.marketplace_offer = kwargs.get('marketplace_offer', None) + + +class PremierAddOnOfferCollection(msrest.serialization.Model): + """Collection of premier add-on offers. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOffer] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PremierAddOnOffer]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PremierAddOnOfferCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class PremierAddOnPatchResource(ProxyOnlyResource): + """ARM resource for a PremierAddOn. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param sku: Premier add on SKU. + :type sku: str + :param product: Premier add on Product. + :type product: str + :param vendor: Premier add on Vendor. + :type vendor: str + :param marketplace_publisher: Premier add on Marketplace publisher. + :type marketplace_publisher: str + :param marketplace_offer: Premier add on Marketplace offer. + :type marketplace_offer: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, + 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PremierAddOnPatchResource, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.product = kwargs.get('product', None) + self.vendor = kwargs.get('vendor', None) + self.marketplace_publisher = kwargs.get('marketplace_publisher', None) + self.marketplace_offer = kwargs.get('marketplace_offer', None) + + +class PrivateAccess(ProxyOnlyResource): + """Description of the parameters of Private Access for a Web Site. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: Whether private access is enabled or not. + :type enabled: bool + :param virtual_networks: The Virtual Networks (and subnets) allowed to access the site + privately. + :type virtual_networks: list[~azure.mgmt.web.v2020_12_01.models.PrivateAccessVirtualNetwork] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[PrivateAccessVirtualNetwork]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateAccess, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.virtual_networks = kwargs.get('virtual_networks', None) + + +class PrivateAccessSubnet(msrest.serialization.Model): + """Description of a Virtual Network subnet that is useable for private site access. + + :param name: The name of the subnet. + :type name: str + :param key: The key (ID) of the subnet. + :type key: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateAccessSubnet, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.key = kwargs.get('key', None) + + +class PrivateAccessVirtualNetwork(msrest.serialization.Model): + """Description of a Virtual Network that is useable for private site access. + + :param name: The name of the Virtual Network. + :type name: str + :param key: The key (ID) of the Virtual Network. + :type key: int + :param resource_id: The ARM uri of the Virtual Network. + :type resource_id: str + :param subnets: A List of subnets that access is allowed to on this Virtual Network. An empty + array (but not null) is interpreted to mean that all subnets are allowed within this Virtual + Network. + :type subnets: list[~azure.mgmt.web.v2020_12_01.models.PrivateAccessSubnet] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'int'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'subnets': {'key': 'subnets', 'type': '[PrivateAccessSubnet]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.key = kwargs.get('key', None) + self.resource_id = kwargs.get('resource_id', None) + self.subnets = kwargs.get('subnets', None) + + +class PrivateEndpointConnectionCollection(msrest.serialization.Model): + """PrivateEndpointConnectionCollection. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: + list[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RemotePrivateEndpointConnectionARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class PrivateLinkConnectionApprovalRequestResource(ProxyOnlyResource): + """Private Endpoint Connection Approval ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param private_link_service_connection_state: The state of a private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkConnectionState'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkConnectionApprovalRequestResource, self).__init__(**kwargs) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + + +class PrivateLinkConnectionState(msrest.serialization.Model): + """The state of a private link connection. + + :param status: Status of a private link connection. + :type status: str + :param description: Description of a private link connection. + :type description: str + :param actions_required: ActionsRequired for a private link connection. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class PrivateLinkResource(msrest.serialization.Model): + """A private link resource. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. + :type id: str + :param name: Required. Name of a private link resource. + :type name: str + :param type: Required. + :type type: str + :param properties: Required. Properties of a private link resource. + :type properties: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourceProperties + """ + + _validation = { + 'id': {'required': True}, + 'name': {'required': True}, + 'type': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = kwargs['id'] + self.name = kwargs['name'] + self.type = kwargs['type'] + self.properties = kwargs['properties'] + + +class PrivateLinkResourceProperties(msrest.serialization.Model): + """Properties of a private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: GroupId of a private link resource. + :vartype group_id: str + :ivar required_members: RequiredMembers of a private link resource. + :vartype required_members: list[str] + :ivar required_zone_names: RequiredZoneNames of a private link resource. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkResourcesWrapper(msrest.serialization.Model): + """Wrapper for a collection of private link resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. + :type value: list[~azure.mgmt.web.v2020_12_01.models.PrivateLinkResource] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourcesWrapper, self).__init__(**kwargs) + self.value = kwargs['value'] + + +class ProcessInfo(ProxyOnlyResource): + """Process Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar identifier: ARM Identifier for deployment. + :vartype identifier: int + :param deployment_name: Deployment name. + :type deployment_name: str + :param href: HRef URI. + :type href: str + :param minidump: Minidump URI. + :type minidump: str + :param is_profile_running: Is profile running?. + :type is_profile_running: bool + :param is_iis_profile_running: Is the IIS Profile running?. + :type is_iis_profile_running: bool + :param iis_profile_timeout_in_seconds: IIS Profile timeout (seconds). + :type iis_profile_timeout_in_seconds: float + :param parent: Parent process. + :type parent: str + :param children: Child process list. + :type children: list[str] + :param threads: Thread list. + :type threads: list[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] + :param open_file_handles: List of open files. + :type open_file_handles: list[str] + :param modules: List of modules. + :type modules: list[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] + :param file_name: File name of this process. + :type file_name: str + :param command_line: Command line. + :type command_line: str + :param user_name: User name. + :type user_name: str + :param handle_count: Handle count. + :type handle_count: int + :param module_count: Module count. + :type module_count: int + :param thread_count: Thread count. + :type thread_count: int + :param start_time: Start time. + :type start_time: ~datetime.datetime + :param total_cpu_time: Total CPU time. + :type total_cpu_time: str + :param user_cpu_time: User CPU time. + :type user_cpu_time: str + :param privileged_cpu_time: Privileged CPU time. + :type privileged_cpu_time: str + :param working_set: Working set. + :type working_set: long + :param peak_working_set: Peak working set. + :type peak_working_set: long + :param private_memory: Private memory size. + :type private_memory: long + :param virtual_memory: Virtual memory size. + :type virtual_memory: long + :param peak_virtual_memory: Peak virtual memory usage. + :type peak_virtual_memory: long + :param paged_system_memory: Paged system memory. + :type paged_system_memory: long + :param non_paged_system_memory: Non-paged system memory. + :type non_paged_system_memory: long + :param paged_memory: Paged memory. + :type paged_memory: long + :param peak_paged_memory: Peak paged memory. + :type peak_paged_memory: long + :param time_stamp: Time stamp. + :type time_stamp: ~datetime.datetime + :param environment_variables: List of environment variables. + :type environment_variables: dict[str, str] + :param is_scm_site: Is this the SCM site?. + :type is_scm_site: bool + :param is_webjob: Is this a Web Job?. + :type is_webjob: bool + :param description: Description of process. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'int'}, + 'deployment_name': {'key': 'properties.deployment_name', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'minidump': {'key': 'properties.minidump', 'type': 'str'}, + 'is_profile_running': {'key': 'properties.is_profile_running', 'type': 'bool'}, + 'is_iis_profile_running': {'key': 'properties.is_iis_profile_running', 'type': 'bool'}, + 'iis_profile_timeout_in_seconds': {'key': 'properties.iis_profile_timeout_in_seconds', 'type': 'float'}, + 'parent': {'key': 'properties.parent', 'type': 'str'}, + 'children': {'key': 'properties.children', 'type': '[str]'}, + 'threads': {'key': 'properties.threads', 'type': '[ProcessThreadInfo]'}, + 'open_file_handles': {'key': 'properties.open_file_handles', 'type': '[str]'}, + 'modules': {'key': 'properties.modules', 'type': '[ProcessModuleInfo]'}, + 'file_name': {'key': 'properties.file_name', 'type': 'str'}, + 'command_line': {'key': 'properties.command_line', 'type': 'str'}, + 'user_name': {'key': 'properties.user_name', 'type': 'str'}, + 'handle_count': {'key': 'properties.handle_count', 'type': 'int'}, + 'module_count': {'key': 'properties.module_count', 'type': 'int'}, + 'thread_count': {'key': 'properties.thread_count', 'type': 'int'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'total_cpu_time': {'key': 'properties.total_cpu_time', 'type': 'str'}, + 'user_cpu_time': {'key': 'properties.user_cpu_time', 'type': 'str'}, + 'privileged_cpu_time': {'key': 'properties.privileged_cpu_time', 'type': 'str'}, + 'working_set': {'key': 'properties.working_set', 'type': 'long'}, + 'peak_working_set': {'key': 'properties.peak_working_set', 'type': 'long'}, + 'private_memory': {'key': 'properties.private_memory', 'type': 'long'}, + 'virtual_memory': {'key': 'properties.virtual_memory', 'type': 'long'}, + 'peak_virtual_memory': {'key': 'properties.peak_virtual_memory', 'type': 'long'}, + 'paged_system_memory': {'key': 'properties.paged_system_memory', 'type': 'long'}, + 'non_paged_system_memory': {'key': 'properties.non_paged_system_memory', 'type': 'long'}, + 'paged_memory': {'key': 'properties.paged_memory', 'type': 'long'}, + 'peak_paged_memory': {'key': 'properties.peak_paged_memory', 'type': 'long'}, + 'time_stamp': {'key': 'properties.time_stamp', 'type': 'iso-8601'}, + 'environment_variables': {'key': 'properties.environment_variables', 'type': '{str}'}, + 'is_scm_site': {'key': 'properties.is_scm_site', 'type': 'bool'}, + 'is_webjob': {'key': 'properties.is_webjob', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProcessInfo, self).__init__(**kwargs) + self.identifier = None + self.deployment_name = kwargs.get('deployment_name', None) + self.href = kwargs.get('href', None) + self.minidump = kwargs.get('minidump', None) + self.is_profile_running = kwargs.get('is_profile_running', None) + self.is_iis_profile_running = kwargs.get('is_iis_profile_running', None) + self.iis_profile_timeout_in_seconds = kwargs.get('iis_profile_timeout_in_seconds', None) + self.parent = kwargs.get('parent', None) + self.children = kwargs.get('children', None) + self.threads = kwargs.get('threads', None) + self.open_file_handles = kwargs.get('open_file_handles', None) + self.modules = kwargs.get('modules', None) + self.file_name = kwargs.get('file_name', None) + self.command_line = kwargs.get('command_line', None) + self.user_name = kwargs.get('user_name', None) + self.handle_count = kwargs.get('handle_count', None) + self.module_count = kwargs.get('module_count', None) + self.thread_count = kwargs.get('thread_count', None) + self.start_time = kwargs.get('start_time', None) + self.total_cpu_time = kwargs.get('total_cpu_time', None) + self.user_cpu_time = kwargs.get('user_cpu_time', None) + self.privileged_cpu_time = kwargs.get('privileged_cpu_time', None) + self.working_set = kwargs.get('working_set', None) + self.peak_working_set = kwargs.get('peak_working_set', None) + self.private_memory = kwargs.get('private_memory', None) + self.virtual_memory = kwargs.get('virtual_memory', None) + self.peak_virtual_memory = kwargs.get('peak_virtual_memory', None) + self.paged_system_memory = kwargs.get('paged_system_memory', None) + self.non_paged_system_memory = kwargs.get('non_paged_system_memory', None) + self.paged_memory = kwargs.get('paged_memory', None) + self.peak_paged_memory = kwargs.get('peak_paged_memory', None) + self.time_stamp = kwargs.get('time_stamp', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.is_scm_site = kwargs.get('is_scm_site', None) + self.is_webjob = kwargs.get('is_webjob', None) + self.description = kwargs.get('description', None) + + +class ProcessInfoCollection(msrest.serialization.Model): + """Collection of Kudu process information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ProcessInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ProcessInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProcessInfoCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class ProcessModuleInfo(ProxyOnlyResource): + """Process Module Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param base_address: Base address. Used as module identifier in ARM resource URI. + :type base_address: str + :param file_name: File name. + :type file_name: str + :param href: HRef URI. + :type href: str + :param file_path: File path. + :type file_path: str + :param module_memory_size: Module memory size. + :type module_memory_size: int + :param file_version: File version. + :type file_version: str + :param file_description: File description. + :type file_description: str + :param product: Product name. + :type product: str + :param product_version: Product version. + :type product_version: str + :param is_debug: Is debug?. + :type is_debug: bool + :param language: Module language (locale). + :type language: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'base_address': {'key': 'properties.base_address', 'type': 'str'}, + 'file_name': {'key': 'properties.file_name', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'file_path': {'key': 'properties.file_path', 'type': 'str'}, + 'module_memory_size': {'key': 'properties.module_memory_size', 'type': 'int'}, + 'file_version': {'key': 'properties.file_version', 'type': 'str'}, + 'file_description': {'key': 'properties.file_description', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'product_version': {'key': 'properties.product_version', 'type': 'str'}, + 'is_debug': {'key': 'properties.is_debug', 'type': 'bool'}, + 'language': {'key': 'properties.language', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProcessModuleInfo, self).__init__(**kwargs) + self.base_address = kwargs.get('base_address', None) + self.file_name = kwargs.get('file_name', None) + self.href = kwargs.get('href', None) + self.file_path = kwargs.get('file_path', None) + self.module_memory_size = kwargs.get('module_memory_size', None) + self.file_version = kwargs.get('file_version', None) + self.file_description = kwargs.get('file_description', None) + self.product = kwargs.get('product', None) + self.product_version = kwargs.get('product_version', None) + self.is_debug = kwargs.get('is_debug', None) + self.language = kwargs.get('language', None) + + +class ProcessModuleInfoCollection(msrest.serialization.Model): + """Collection of Kudu thread information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ProcessModuleInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProcessModuleInfoCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class ProcessThreadInfo(ProxyOnlyResource): + """Process Thread Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar identifier: Site extension ID. + :vartype identifier: int + :param href: HRef URI. + :type href: str + :param process: Process URI. + :type process: str + :param start_address: Start address. + :type start_address: str + :param current_priority: Current thread priority. + :type current_priority: int + :param priority_level: Thread priority level. + :type priority_level: str + :param base_priority: Base priority. + :type base_priority: int + :param start_time: Start time. + :type start_time: ~datetime.datetime + :param total_processor_time: Total processor time. + :type total_processor_time: str + :param user_processor_time: User processor time. + :type user_processor_time: str + :param state: Thread state. + :type state: str + :param wait_reason: Wait reason. + :type wait_reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'int'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'process': {'key': 'properties.process', 'type': 'str'}, + 'start_address': {'key': 'properties.start_address', 'type': 'str'}, + 'current_priority': {'key': 'properties.current_priority', 'type': 'int'}, + 'priority_level': {'key': 'properties.priority_level', 'type': 'str'}, + 'base_priority': {'key': 'properties.base_priority', 'type': 'int'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'total_processor_time': {'key': 'properties.total_processor_time', 'type': 'str'}, + 'user_processor_time': {'key': 'properties.user_processor_time', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'wait_reason': {'key': 'properties.wait_reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProcessThreadInfo, self).__init__(**kwargs) + self.identifier = None + self.href = kwargs.get('href', None) + self.process = kwargs.get('process', None) + self.start_address = kwargs.get('start_address', None) + self.current_priority = kwargs.get('current_priority', None) + self.priority_level = kwargs.get('priority_level', None) + self.base_priority = kwargs.get('base_priority', None) + self.start_time = kwargs.get('start_time', None) + self.total_processor_time = kwargs.get('total_processor_time', None) + self.user_processor_time = kwargs.get('user_processor_time', None) + self.state = kwargs.get('state', None) + self.wait_reason = kwargs.get('wait_reason', None) + + +class ProcessThreadInfoCollection(msrest.serialization.Model): + """Collection of Kudu thread information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ProcessThreadInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProcessThreadInfoCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class PublicCertificate(ProxyOnlyResource): + """Public certificate object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param blob: Public Certificate byte array. + :type blob: bytearray + :param public_certificate_location: Public Certificate Location. Possible values include: + "CurrentUserMy", "LocalMachineMy", "Unknown". + :type public_certificate_location: str or + ~azure.mgmt.web.v2020_12_01.models.PublicCertificateLocation + :ivar thumbprint: Certificate Thumbprint. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'blob': {'key': 'properties.blob', 'type': 'bytearray'}, + 'public_certificate_location': {'key': 'properties.publicCertificateLocation', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PublicCertificate, self).__init__(**kwargs) + self.blob = kwargs.get('blob', None) + self.public_certificate_location = kwargs.get('public_certificate_location', None) + self.thumbprint = None + + +class PublicCertificateCollection(msrest.serialization.Model): + """Collection of public certificates. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.PublicCertificate] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PublicCertificate]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PublicCertificateCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class PushSettings(ProxyOnlyResource): + """Push settings for the App. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Gets or sets a flag indicating whether the Push endpoint is enabled. + :type is_push_enabled: bool + :param tag_whitelist_json: Gets or sets a JSON string containing a list of tags that are + whitelisted for use by the push registration endpoint. + :type tag_whitelist_json: str + :param tags_requiring_auth: Gets or sets a JSON string containing a list of tags that require + user authentication to be used in the push registration endpoint. + Tags can consist of alphanumeric characters and the following: + '_', '@', '#', '.', ':', '-'. + Validation should be performed at the PushRequestHandler. + :type tags_requiring_auth: str + :param dynamic_tags_json: Gets or sets a JSON string containing a list of dynamic tags that + will be evaluated from user claims in the push registration endpoint. + :type dynamic_tags_json: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_push_enabled': {'key': 'properties.isPushEnabled', 'type': 'bool'}, + 'tag_whitelist_json': {'key': 'properties.tagWhitelistJson', 'type': 'str'}, + 'tags_requiring_auth': {'key': 'properties.tagsRequiringAuth', 'type': 'str'}, + 'dynamic_tags_json': {'key': 'properties.dynamicTagsJson', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PushSettings, self).__init__(**kwargs) + self.is_push_enabled = kwargs.get('is_push_enabled', None) + self.tag_whitelist_json = kwargs.get('tag_whitelist_json', None) + self.tags_requiring_auth = kwargs.get('tags_requiring_auth', None) + self.dynamic_tags_json = kwargs.get('dynamic_tags_json', None) + + +class QueryUtterancesResult(msrest.serialization.Model): + """Result for utterances query. + + :param sample_utterance: A sample utterance. + :type sample_utterance: ~azure.mgmt.web.v2020_12_01.models.SampleUtterance + :param score: Score of a sample utterance. + :type score: float + """ + + _attribute_map = { + 'sample_utterance': {'key': 'sampleUtterance', 'type': 'SampleUtterance'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryUtterancesResult, self).__init__(**kwargs) + self.sample_utterance = kwargs.get('sample_utterance', None) + self.score = kwargs.get('score', None) + + +class QueryUtterancesResults(msrest.serialization.Model): + """Suggested utterances where the detector can be applicable. + + :param query: Search Query. + :type query: str + :param results: Array of utterance results for search query. + :type results: list[~azure.mgmt.web.v2020_12_01.models.QueryUtterancesResult] + """ + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'results': {'key': 'results', 'type': '[QueryUtterancesResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryUtterancesResults, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.results = kwargs.get('results', None) + + +class RampUpRule(msrest.serialization.Model): + """Routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to gradually change routing % based on performance. + + :param action_host_name: Hostname of a slot to which the traffic will be redirected if decided + to. E.g. myapp-stage.azurewebsites.net. + :type action_host_name: str + :param reroute_percentage: Percentage of the traffic which will be redirected to + :code:`ActionHostName`. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to add/remove from + :code:`ReroutePercentage` until it reaches + \n:code:`MinReroutePercentage` or + :code:`MaxReroutePercentage`. Site metrics are checked every N minutes specified + in :code:`ChangeIntervalInMinutes`.\nCustom decision algorithm + can be provided in TiPCallback site extension which URL can be specified in + :code:`ChangeDecisionCallbackUrl`. + :type change_step: float + :param change_interval_in_minutes: Specifies interval in minutes to reevaluate + ReroutePercentage. + :type change_interval_in_minutes: int + :param min_reroute_percentage: Specifies lower boundary above which ReroutePercentage will + stay. + :type min_reroute_percentage: float + :param max_reroute_percentage: Specifies upper boundary below which ReroutePercentage will + stay. + :type max_reroute_percentage: float + :param change_decision_callback_url: Custom decision algorithm can be provided in TiPCallback + site extension which URL can be specified. See TiPCallback site extension for the scaffold and + contracts. + https://www.siteextensions.net/packages/TiPCallback/. + :type change_decision_callback_url: str + :param name: Name of the routing rule. The recommended name would be to point to the slot which + will receive the traffic in the experiment. + :type name: str + """ + + _attribute_map = { + 'action_host_name': {'key': 'actionHostName', 'type': 'str'}, + 'reroute_percentage': {'key': 'reroutePercentage', 'type': 'float'}, + 'change_step': {'key': 'changeStep', 'type': 'float'}, + 'change_interval_in_minutes': {'key': 'changeIntervalInMinutes', 'type': 'int'}, + 'min_reroute_percentage': {'key': 'minReroutePercentage', 'type': 'float'}, + 'max_reroute_percentage': {'key': 'maxReroutePercentage', 'type': 'float'}, + 'change_decision_callback_url': {'key': 'changeDecisionCallbackUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RampUpRule, self).__init__(**kwargs) + self.action_host_name = kwargs.get('action_host_name', None) + self.reroute_percentage = kwargs.get('reroute_percentage', None) + self.change_step = kwargs.get('change_step', None) + self.change_interval_in_minutes = kwargs.get('change_interval_in_minutes', None) + self.min_reroute_percentage = kwargs.get('min_reroute_percentage', None) + self.max_reroute_percentage = kwargs.get('max_reroute_percentage', None) + self.change_decision_callback_url = kwargs.get('change_decision_callback_url', None) + self.name = kwargs.get('name', None) + + +class Recommendation(ProxyOnlyResource): + """Represents a recommendation result generated by the recommendation engine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param creation_time: Timestamp when this instance was created. + :type creation_time: ~datetime.datetime + :param recommendation_id: A GUID value that each recommendation object is associated with. + :type recommendation_id: str + :param resource_id: Full ARM resource ID string that this recommendation object is associated + with. + :type resource_id: str + :param resource_scope: Name of a resource type this recommendation applies, e.g. Subscription, + ServerFarm, Site. Possible values include: "ServerFarm", "Subscription", "WebSite". + :type resource_scope: str or ~azure.mgmt.web.v2020_12_01.models.ResourceScopeType + :param rule_name: Unique name of the rule. + :type rule_name: str + :param display_name: UI friendly name of the rule (may not be unique). + :type display_name: str + :param message: Recommendation text. + :type message: str + :param level: Level indicating how critical this recommendation can impact. Possible values + include: "Critical", "Warning", "Information", "NonUrgentSuggestion". + :type level: str or ~azure.mgmt.web.v2020_12_01.models.NotificationLevel + :param channels: List of channels that this recommendation can apply. Possible values include: + "Notification", "Api", "Email", "Webhook", "All". + :type channels: str or ~azure.mgmt.web.v2020_12_01.models.Channels + :ivar category_tags: The list of category tags that this recommendation belongs to. + :vartype category_tags: list[str] + :param action_name: Name of action recommended by this object. + :type action_name: str + :param enabled: True if this recommendation is still valid (i.e. "actionable"). False if it is + invalid. + :type enabled: int + :param states: The list of states of this recommendation. If it's null then it should be + considered "Active". + :type states: list[str] + :param start_time: The beginning time in UTC of a range that the recommendation refers to. + :type start_time: ~datetime.datetime + :param end_time: The end time in UTC of a range that the recommendation refers to. + :type end_time: ~datetime.datetime + :param next_notification_time: When to notify this recommendation next in UTC. Null means that + this will never be notified anymore. + :type next_notification_time: ~datetime.datetime + :param notification_expiration_time: Date and time in UTC when this notification expires. + :type notification_expiration_time: ~datetime.datetime + :param notified_time: Last timestamp in UTC this instance was actually notified. Null means + that this recommendation hasn't been notified yet. + :type notified_time: ~datetime.datetime + :param score: A metric value measured by the rule. + :type score: float + :param is_dynamic: True if this is associated with a dynamically added rule. + :type is_dynamic: bool + :param extension_name: Extension name of the portal if exists. + :type extension_name: str + :param blade_name: Deep link to a blade on the portal. + :type blade_name: str + :param forward_link: Forward link to an external document associated with the rule. + :type forward_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category_tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'recommendation_id': {'key': 'properties.recommendationId', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'resource_scope': {'key': 'properties.resourceScope', 'type': 'str'}, + 'rule_name': {'key': 'properties.ruleName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'message': {'key': 'properties.message', 'type': 'str'}, + 'level': {'key': 'properties.level', 'type': 'str'}, + 'channels': {'key': 'properties.channels', 'type': 'str'}, + 'category_tags': {'key': 'properties.categoryTags', 'type': '[str]'}, + 'action_name': {'key': 'properties.actionName', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'int'}, + 'states': {'key': 'properties.states', 'type': '[str]'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'next_notification_time': {'key': 'properties.nextNotificationTime', 'type': 'iso-8601'}, + 'notification_expiration_time': {'key': 'properties.notificationExpirationTime', 'type': 'iso-8601'}, + 'notified_time': {'key': 'properties.notifiedTime', 'type': 'iso-8601'}, + 'score': {'key': 'properties.score', 'type': 'float'}, + 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, + 'extension_name': {'key': 'properties.extensionName', 'type': 'str'}, + 'blade_name': {'key': 'properties.bladeName', 'type': 'str'}, + 'forward_link': {'key': 'properties.forwardLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Recommendation, self).__init__(**kwargs) + self.creation_time = kwargs.get('creation_time', None) + self.recommendation_id = kwargs.get('recommendation_id', None) + self.resource_id = kwargs.get('resource_id', None) + self.resource_scope = kwargs.get('resource_scope', None) + self.rule_name = kwargs.get('rule_name', None) + self.display_name = kwargs.get('display_name', None) + self.message = kwargs.get('message', None) + self.level = kwargs.get('level', None) + self.channels = kwargs.get('channels', None) + self.category_tags = None + self.action_name = kwargs.get('action_name', None) + self.enabled = kwargs.get('enabled', None) + self.states = kwargs.get('states', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.next_notification_time = kwargs.get('next_notification_time', None) + self.notification_expiration_time = kwargs.get('notification_expiration_time', None) + self.notified_time = kwargs.get('notified_time', None) + self.score = kwargs.get('score', None) + self.is_dynamic = kwargs.get('is_dynamic', None) + self.extension_name = kwargs.get('extension_name', None) + self.blade_name = kwargs.get('blade_name', None) + self.forward_link = kwargs.get('forward_link', None) + + +class RecommendationCollection(msrest.serialization.Model): + """Collection of recommendations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Recommendation] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Recommendation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecommendationCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class RecommendationRule(ProxyOnlyResource): + """Represents a recommendation rule that the recommendation engine can perform. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param recommendation_name: Unique name of the rule. + :type recommendation_name: str + :param display_name: UI friendly name of the rule. + :type display_name: str + :param message: Localized name of the rule (Good for UI). + :type message: str + :param recommendation_id: Recommendation ID of an associated recommendation object tied to the + rule, if exists. + If such an object doesn't exist, it is set to null. + :type recommendation_id: str + :param description: Localized detailed description of the rule. + :type description: str + :param action_name: Name of action that is recommended by this rule in string. + :type action_name: str + :param level: Level of impact indicating how critical this rule is. Possible values include: + "Critical", "Warning", "Information", "NonUrgentSuggestion". + :type level: str or ~azure.mgmt.web.v2020_12_01.models.NotificationLevel + :param channels: List of available channels that this rule applies. Possible values include: + "Notification", "Api", "Email", "Webhook", "All". + :type channels: str or ~azure.mgmt.web.v2020_12_01.models.Channels + :ivar category_tags: The list of category tags that this recommendation rule belongs to. + :vartype category_tags: list[str] + :param is_dynamic: True if this is associated with a dynamically added rule. + :type is_dynamic: bool + :param extension_name: Extension name of the portal if exists. Applicable to dynamic rule only. + :type extension_name: str + :param blade_name: Deep link to a blade on the portal. Applicable to dynamic rule only. + :type blade_name: str + :param forward_link: Forward link to an external document associated with the rule. Applicable + to dynamic rule only. + :type forward_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category_tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'message': {'key': 'properties.message', 'type': 'str'}, + 'recommendation_id': {'key': 'properties.recommendationId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'action_name': {'key': 'properties.actionName', 'type': 'str'}, + 'level': {'key': 'properties.level', 'type': 'str'}, + 'channels': {'key': 'properties.channels', 'type': 'str'}, + 'category_tags': {'key': 'properties.categoryTags', 'type': '[str]'}, + 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, + 'extension_name': {'key': 'properties.extensionName', 'type': 'str'}, + 'blade_name': {'key': 'properties.bladeName', 'type': 'str'}, + 'forward_link': {'key': 'properties.forwardLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecommendationRule, self).__init__(**kwargs) + self.recommendation_name = kwargs.get('recommendation_name', None) + self.display_name = kwargs.get('display_name', None) + self.message = kwargs.get('message', None) + self.recommendation_id = kwargs.get('recommendation_id', None) + self.description = kwargs.get('description', None) + self.action_name = kwargs.get('action_name', None) + self.level = kwargs.get('level', None) + self.channels = kwargs.get('channels', None) + self.category_tags = None + self.is_dynamic = kwargs.get('is_dynamic', None) + self.extension_name = kwargs.get('extension_name', None) + self.blade_name = kwargs.get('blade_name', None) + self.forward_link = kwargs.get('forward_link', None) + + +class ReissueCertificateOrderRequest(ProxyOnlyResource): + """Class representing certificate reissue request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param key_size: Certificate Key Size. + :type key_size: int + :param delay_existing_revoke_in_hours: Delay in hours to revoke existing certificate after the + new certificate is issued. + :type delay_existing_revoke_in_hours: int + :param csr: Csr to be used for re-key operation. + :type csr: str + :param is_private_key_external: Should we change the ASC type (from managed private key to + external private key and vice versa). + :type is_private_key_external: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'delay_existing_revoke_in_hours': {'key': 'properties.delayExistingRevokeInHours', 'type': 'int'}, + 'csr': {'key': 'properties.csr', 'type': 'str'}, + 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ReissueCertificateOrderRequest, self).__init__(**kwargs) + self.key_size = kwargs.get('key_size', None) + self.delay_existing_revoke_in_hours = kwargs.get('delay_existing_revoke_in_hours', None) + self.csr = kwargs.get('csr', None) + self.is_private_key_external = kwargs.get('is_private_key_external', None) + + +class RelayServiceConnectionEntity(ProxyOnlyResource): + """Hybrid Connection for an App Service app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param entity_name: + :type entity_name: str + :param entity_connection_string: + :type entity_connection_string: str + :param resource_type: + :type resource_type: str + :param resource_connection_string: + :type resource_connection_string: str + :param hostname: + :type hostname: str + :param port: + :type port: int + :param biztalk_uri: + :type biztalk_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entity_name': {'key': 'properties.entityName', 'type': 'str'}, + 'entity_connection_string': {'key': 'properties.entityConnectionString', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'resource_connection_string': {'key': 'properties.resourceConnectionString', 'type': 'str'}, + 'hostname': {'key': 'properties.hostname', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'biztalk_uri': {'key': 'properties.biztalkUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RelayServiceConnectionEntity, self).__init__(**kwargs) + self.entity_name = kwargs.get('entity_name', None) + self.entity_connection_string = kwargs.get('entity_connection_string', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_connection_string = kwargs.get('resource_connection_string', None) + self.hostname = kwargs.get('hostname', None) + self.port = kwargs.get('port', None) + self.biztalk_uri = kwargs.get('biztalk_uri', None) + + +class RemotePrivateEndpointConnectionARMResource(ProxyOnlyResource): + """Remote Private Endpoint Connection ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: + :vartype provisioning_state: str + :param private_endpoint: PrivateEndpoint of a remote private endpoint connection. + :type private_endpoint: ~azure.mgmt.web.v2020_12_01.models.ArmIdWrapper + :param private_link_service_connection_state: The state of a private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState + :param ip_addresses: Private IPAddresses mapped to the remote private endpoint. + :type ip_addresses: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'ArmIdWrapper'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkConnectionState'}, + 'ip_addresses': {'key': 'properties.ipAddresses', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(RemotePrivateEndpointConnectionARMResource, self).__init__(**kwargs) + self.provisioning_state = None + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.ip_addresses = kwargs.get('ip_addresses', None) + + +class Rendering(msrest.serialization.Model): + """Instructions for rendering the data. + + :param type: Rendering Type. Possible values include: "NoGraph", "Table", "TimeSeries", + "TimeSeriesPerInstance", "PieChart", "DataSummary", "Email", "Insights", "DynamicInsight", + "Markdown", "Detector", "DropDown", "Card", "Solution", "Guage", "Form", "ChangeSets", + "ChangeAnalysisOnboarding", "ChangesView", "AppInsight", "DependencyGraph", "DownTime", + "SummaryCard", "SearchComponent", "AppInsightEnablement". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.RenderingType + :param title: Title of data. + :type title: str + :param description: Description of the data that will help it be interpreted. + :type description: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Rendering, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + + +class RenewCertificateOrderRequest(ProxyOnlyResource): + """Class representing certificate renew request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param key_size: Certificate Key Size. + :type key_size: int + :param csr: Csr to be used for re-key operation. + :type csr: str + :param is_private_key_external: Should we change the ASC type (from managed private key to + external private key and vice versa). + :type is_private_key_external: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'csr': {'key': 'properties.csr', 'type': 'str'}, + 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(RenewCertificateOrderRequest, self).__init__(**kwargs) + self.key_size = kwargs.get('key_size', None) + self.csr = kwargs.get('csr', None) + self.is_private_key_external = kwargs.get('is_private_key_external', None) + + +class RequestsBasedTrigger(msrest.serialization.Model): + """Trigger based on total requests. + + :param count: Request Count. + :type count: int + :param time_interval: Time interval. + :type time_interval: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', None) + + +class ResourceCollection(msrest.serialization.Model): + """Collection of resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[str] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[str]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class ResourceHealthMetadata(ProxyOnlyResource): + """Used for getting ResourceHealthCheck settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param category: The category that the resource matches in the RHC Policy File. + :type category: str + :param signal_availability: Is there a health signal for the resource. + :type signal_availability: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'signal_availability': {'key': 'properties.signalAvailability', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceHealthMetadata, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.signal_availability = kwargs.get('signal_availability', None) + + +class ResourceHealthMetadataCollection(msrest.serialization.Model): + """Collection of resource health metadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceHealthMetadata]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceHealthMetadataCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class ResourceMetricAvailability(msrest.serialization.Model): + """Metrics availability and retention. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar time_grain: Time grain . + :vartype time_grain: str + :ivar retention: Retention period for the current time grain. + :vartype retention: str + """ + + _validation = { + 'time_grain': {'readonly': True}, + 'retention': {'readonly': True}, + } + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceMetricAvailability, self).__init__(**kwargs) + self.time_grain = None + self.retention = None + + +class ResourceMetricDefinition(ProxyOnlyResource): + """Metadata for the metrics. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar unit: Unit of the metric. + :vartype unit: str + :ivar primary_aggregation_type: Primary aggregation type. + :vartype primary_aggregation_type: str + :ivar metric_availabilities: List of time grains supported for the metric together with + retention period. + :vartype metric_availabilities: + list[~azure.mgmt.web.v2020_12_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, + 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[ResourceMetricAvailability]'}, + 'resource_uri': {'key': 'properties.resourceUri', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceMetricDefinition, self).__init__(**kwargs) + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.properties = None + + +class ResourceMetricDefinitionCollection(msrest.serialization.Model): + """Collection of metric definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinition] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceMetricDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceMetricDefinitionCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class ResourceNameAvailability(msrest.serialization.Model): + """Information regarding availability of a resource name. + + :param name_available: :code:`true` indicates name is valid and available. + :code:`false` indicates the name is invalid, unavailable, or both. + :type name_available: bool + :param reason: :code:`Invalid` indicates the name provided does not match Azure + App Service naming requirements. :code:`AlreadyExists` indicates that the name is + already in use and is therefore unavailable. Possible values include: "Invalid", + "AlreadyExists". + :type reason: str or ~azure.mgmt.web.v2020_12_01.models.InAvailabilityReasonType + :param message: If reason == invalid, provide the user with the reason why the given name is + invalid, and provide the resource naming requirements so that the user can select a valid name. + If reason == AlreadyExists, explain that resource name is already in use, and direct them to + select a different name. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceNameAvailability, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) + + +class ResourceNameAvailabilityRequest(msrest.serialization.Model): + """Resource name availability request content. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Resource name to verify. + :type name: str + :param type: Required. Resource type used for verification. Possible values include: "Site", + "Slot", "HostingEnvironment", "PublishingUser", "Microsoft.Web/sites", + "Microsoft.Web/sites/slots", "Microsoft.Web/hostingEnvironments", + "Microsoft.Web/publishingUsers". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes + :param is_fqdn: Is fully qualified domain name. + :type is_fqdn: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_fqdn': {'key': 'isFqdn', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs['name'] + self.type = kwargs['type'] + self.is_fqdn = kwargs.get('is_fqdn', None) + + +class ResponseMetaData(msrest.serialization.Model): + """ResponseMetaData. + + :param data_source: Source of the Data. + :type data_source: ~azure.mgmt.web.v2020_12_01.models.DataSource + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, + } + + def __init__( + self, + **kwargs + ): + super(ResponseMetaData, self).__init__(**kwargs) + self.data_source = kwargs.get('data_source', None) + + +class RestoreRequest(ProxyOnlyResource): + """Description of a restore request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: SAS URL to the container. + :type storage_account_url: str + :param blob_name: Name of a blob which contains the backup. + :type blob_name: str + :param overwrite: :code:`true` if the restore operation can overwrite target app; + otherwise, :code:`false`. :code:`true` is needed if trying to restore + over an existing app. + :type overwrite: bool + :param site_name: Name of an app. + :type site_name: str + :param databases: Collection of databases which should be restored. This list has to match the + list of databases included in the backup. + :type databases: list[~azure.mgmt.web.v2020_12_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an app with custom + domains. :code:`true` to remove custom domains automatically. If + :code:`false`, custom domains are added to + the app's object when it is being restored, but that might fail due to conflicts during the + operation. + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site content. + :type ignore_databases: bool + :param app_service_plan: Specify app service plan that will own restored site. + :type app_service_plan: str + :param operation_type: Operation type. Possible values include: "Default", "Clone", + "Relocation", "Snapshot", "CloudFS". Default value: "Default". + :type operation_type: str or ~azure.mgmt.web.v2020_12_01.models.BackupRestoreOperationType + :param adjust_connection_strings: :code:`true` if SiteConfig.ConnectionStrings + should be set in new app; otherwise, :code:`false`. + :type adjust_connection_strings: bool + :param hosting_environment: App Service Environment name, if needed (only when restoring an app + to an App Service Environment). + :type hosting_environment: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, + 'blob_name': {'key': 'properties.blobName', 'type': 'str'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'site_name': {'key': 'properties.siteName', 'type': 'str'}, + 'databases': {'key': 'properties.databases', 'type': '[DatabaseBackupSetting]'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + 'ignore_databases': {'key': 'properties.ignoreDatabases', 'type': 'bool'}, + 'app_service_plan': {'key': 'properties.appServicePlan', 'type': 'str'}, + 'operation_type': {'key': 'properties.operationType', 'type': 'str'}, + 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, + 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreRequest, self).__init__(**kwargs) + self.storage_account_url = kwargs.get('storage_account_url', None) + self.blob_name = kwargs.get('blob_name', None) + self.overwrite = kwargs.get('overwrite', None) + self.site_name = kwargs.get('site_name', None) + self.databases = kwargs.get('databases', None) + self.ignore_conflicting_host_names = kwargs.get('ignore_conflicting_host_names', False) + self.ignore_databases = kwargs.get('ignore_databases', False) + self.app_service_plan = kwargs.get('app_service_plan', None) + self.operation_type = kwargs.get('operation_type', "Default") + self.adjust_connection_strings = kwargs.get('adjust_connection_strings', None) + self.hosting_environment = kwargs.get('hosting_environment', None) + + +class SampleUtterance(msrest.serialization.Model): + """Sample utterance. + + :param text: Text attribute of sample utterance. + :type text: str + :param links: Links attribute of sample utterance. + :type links: list[str] + :param qid: Question id of sample utterance (for stackoverflow questions titles). + :type qid: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'links': {'key': 'links', 'type': '[str]'}, + 'qid': {'key': 'qid', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SampleUtterance, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.links = kwargs.get('links', None) + self.qid = kwargs.get('qid', None) + + +class ServiceSpecification(msrest.serialization.Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: list[~azure.mgmt.web.v2020_12_01.models.MetricSpecification] + :param log_specifications: + :type log_specifications: list[~azure.mgmt.web.v2020_12_01.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) + self.log_specifications = kwargs.get('log_specifications', None) + + +class Site(Resource): + """A web app, a mobile app backend, or an API app. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: Managed service identity. + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :ivar state: Current state of the app. + :vartype state: str + :ivar host_names: Hostnames associated with the app. + :vartype host_names: list[str] + :ivar repository_site_name: Name of the repository site. + :vartype repository_site_name: str + :ivar usage_state: State indicating whether the app has exceeded its quota usage. Read-only. + Possible values include: "Normal", "Exceeded". + :vartype usage_state: str or ~azure.mgmt.web.v2020_12_01.models.UsageState + :param enabled: :code:`true` if the app is enabled; otherwise, + :code:`false`. Setting this value to false disables the app (takes the app + offline). + :type enabled: bool + :ivar enabled_host_names: Enabled hostnames for the app.Hostnames need to be assigned (see + HostNames) AND enabled. Otherwise, + the app is not served on those hostnames. + :vartype enabled_host_names: list[str] + :ivar availability_state: Management information availability state for the app. Possible + values include: "Normal", "Limited", "DisasterRecoveryMode". + :vartype availability_state: str or ~azure.mgmt.web.v2020_12_01.models.SiteAvailabilityState + :param host_name_ssl_states: Hostname SSL states are used to manage the SSL bindings for app's + hostnames. + :type host_name_ssl_states: list[~azure.mgmt.web.v2020_12_01.models.HostNameSslState] + :param server_farm_id: Resource ID of the associated App Service plan, formatted as: + "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + :type server_farm_id: str + :param reserved: :code:`true` if reserved; otherwise, :code:`false`. + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. + :type hyper_v: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. + :vartype last_modified_time_utc: ~datetime.datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfig + :ivar traffic_manager_host_names: Azure Traffic Manager hostnames associated with the app. + Read-only. + :vartype traffic_manager_host_names: list[str] + :param scm_site_also_stopped: :code:`true` to stop SCM (KUDU) site when the app is + stopped; otherwise, :code:`false`. The default is :code:`false`. + :type scm_site_also_stopped: bool + :ivar target_swap_slot: Specifies which deployment slot this app will swap into. Read-only. + :vartype target_swap_slot: str + :param hosting_environment_profile: App Service Environment to use for the app. + :type hosting_environment_profile: ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: :code:`true` to enable client affinity; + :code:`false` to stop sending session affinity cookies, which route client + requests in the same session to the same instance. Default is :code:`true`. + :type client_affinity_enabled: bool + :param client_cert_enabled: :code:`true` to enable client certificate + authentication (TLS mutual authentication); otherwise, :code:`false`. Default is + :code:`false`. + :type client_cert_enabled: bool + :param client_cert_mode: This composes with ClientCertEnabled setting. + + + * ClientCertEnabled: false means ClientCert is ignored. + * ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or + accepted. Possible values include: "Required", "Optional", "OptionalInteractiveUser". + :type client_cert_mode: str or ~azure.mgmt.web.v2020_12_01.models.ClientCertMode + :param client_cert_exclusion_paths: client certificate authentication comma-separated exclusion + paths. + :type client_cert_exclusion_paths: str + :param host_names_disabled: :code:`true` to disable the public hostnames of the + app; otherwise, :code:`false`. + If :code:`true`, the app is only accessible via API management process. + :type host_names_disabled: bool + :param custom_domain_verification_id: Unique identifier that verifies the custom domains + assigned to the app. Customer will add this id to a txt record for verification. + :type custom_domain_verification_id: str + :ivar outbound_ip_addresses: List of IP addresses that the app uses for outbound connections + (e.g. database access). Includes VIPs from tenants that site can be hosted with current + settings. Read-only. + :vartype outbound_ip_addresses: str + :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. + :vartype possible_outbound_ip_addresses: str + :param container_size: Size of the function container. + :type container_size: int + :param daily_memory_time_quota: Maximum allowed daily memory-time quota (applicable on dynamic + apps only). + :type daily_memory_time_quota: int + :ivar suspended_till: App suspended till in case memory-time quota is exceeded. + :vartype suspended_till: ~datetime.datetime + :ivar max_number_of_workers: Maximum number of workers. + This only applies to Functions container. + :vartype max_number_of_workers: int + :param cloning_info: If specified during app creation, the app is cloned from a source app. + :type cloning_info: ~azure.mgmt.web.v2020_12_01.models.CloningInfo + :ivar resource_group: Name of the resource group the app belongs to. Read-only. + :vartype resource_group: str + :ivar is_default_container: :code:`true` if the app is a default container; + otherwise, :code:`false`. + :vartype is_default_container: bool + :ivar default_host_name: Default hostname of the app. Read-only. + :vartype default_host_name: str + :ivar slot_swap_status: Status of the last deployment slot swap operation. + :vartype slot_swap_status: ~azure.mgmt.web.v2020_12_01.models.SlotSwapStatus + :param key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :type key_vault_reference_identity: str + :param https_only: HttpsOnly: configures a web site to accept only https requests. Issues + redirect for + http requests. + :type https_only: bool + :param redundancy_mode: Site redundancy mode. Possible values include: "None", "Manual", + "Failover", "ActiveActive", "GeoRedundant". + :type redundancy_mode: str or ~azure.mgmt.web.v2020_12_01.models.RedundancyMode + :ivar in_progress_operation_id: Specifies an operation id if this site has a pending operation. + :vartype in_progress_operation_id: str + :param storage_account_required: Checks if Customer provided storage account is required. + :type storage_account_required: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'host_names': {'readonly': True}, + 'repository_site_name': {'readonly': True}, + 'usage_state': {'readonly': True}, + 'enabled_host_names': {'readonly': True}, + 'availability_state': {'readonly': True}, + 'last_modified_time_utc': {'readonly': True}, + 'traffic_manager_host_names': {'readonly': True}, + 'target_swap_slot': {'readonly': True}, + 'outbound_ip_addresses': {'readonly': True}, + 'possible_outbound_ip_addresses': {'readonly': True}, + 'suspended_till': {'readonly': True}, + 'max_number_of_workers': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'is_default_container': {'readonly': True}, + 'default_host_name': {'readonly': True}, + 'slot_swap_status': {'readonly': True}, + 'in_progress_operation_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + 'repository_site_name': {'key': 'properties.repositorySiteName', 'type': 'str'}, + 'usage_state': {'key': 'properties.usageState', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'str'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, + 'last_modified_time_utc': {'key': 'properties.lastModifiedTimeUtc', 'type': 'iso-8601'}, + 'site_config': {'key': 'properties.siteConfig', 'type': 'SiteConfig'}, + 'traffic_manager_host_names': {'key': 'properties.trafficManagerHostNames', 'type': '[str]'}, + 'scm_site_also_stopped': {'key': 'properties.scmSiteAlsoStopped', 'type': 'bool'}, + 'target_swap_slot': {'key': 'properties.targetSwapSlot', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'client_affinity_enabled': {'key': 'properties.clientAffinityEnabled', 'type': 'bool'}, + 'client_cert_enabled': {'key': 'properties.clientCertEnabled', 'type': 'bool'}, + 'client_cert_mode': {'key': 'properties.clientCertMode', 'type': 'str'}, + 'client_cert_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + 'custom_domain_verification_id': {'key': 'properties.customDomainVerificationId', 'type': 'str'}, + 'outbound_ip_addresses': {'key': 'properties.outboundIpAddresses', 'type': 'str'}, + 'possible_outbound_ip_addresses': {'key': 'properties.possibleOutboundIpAddresses', 'type': 'str'}, + 'container_size': {'key': 'properties.containerSize', 'type': 'int'}, + 'daily_memory_time_quota': {'key': 'properties.dailyMemoryTimeQuota', 'type': 'int'}, + 'suspended_till': {'key': 'properties.suspendedTill', 'type': 'iso-8601'}, + 'max_number_of_workers': {'key': 'properties.maxNumberOfWorkers', 'type': 'int'}, + 'cloning_info': {'key': 'properties.cloningInfo', 'type': 'CloningInfo'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'is_default_container': {'key': 'properties.isDefaultContainer', 'type': 'bool'}, + 'default_host_name': {'key': 'properties.defaultHostName', 'type': 'str'}, + 'slot_swap_status': {'key': 'properties.slotSwapStatus', 'type': 'SlotSwapStatus'}, + 'key_vault_reference_identity': {'key': 'properties.keyVaultReferenceIdentity', 'type': 'str'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'str'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Site, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.state = None + self.host_names = None + self.repository_site_name = None + self.usage_state = None + self.enabled = kwargs.get('enabled', None) + self.enabled_host_names = None + self.availability_state = None + self.host_name_ssl_states = kwargs.get('host_name_ssl_states', None) + self.server_farm_id = kwargs.get('server_farm_id', None) + self.reserved = kwargs.get('reserved', False) + self.is_xenon = kwargs.get('is_xenon', False) + self.hyper_v = kwargs.get('hyper_v', False) + self.last_modified_time_utc = None + self.site_config = kwargs.get('site_config', None) + self.traffic_manager_host_names = None + self.scm_site_also_stopped = kwargs.get('scm_site_also_stopped', False) + self.target_swap_slot = None + self.hosting_environment_profile = kwargs.get('hosting_environment_profile', None) + self.client_affinity_enabled = kwargs.get('client_affinity_enabled', None) + self.client_cert_enabled = kwargs.get('client_cert_enabled', None) + self.client_cert_mode = kwargs.get('client_cert_mode', None) + self.client_cert_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) + self.host_names_disabled = kwargs.get('host_names_disabled', None) + self.custom_domain_verification_id = kwargs.get('custom_domain_verification_id', None) + self.outbound_ip_addresses = None + self.possible_outbound_ip_addresses = None + self.container_size = kwargs.get('container_size', None) + self.daily_memory_time_quota = kwargs.get('daily_memory_time_quota', None) + self.suspended_till = None + self.max_number_of_workers = None + self.cloning_info = kwargs.get('cloning_info', None) + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.key_vault_reference_identity = kwargs.get('key_vault_reference_identity', None) + self.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.storage_account_required = kwargs.get('storage_account_required', None) + + +class SiteAuthSettings(ProxyOnlyResource): + """Configuration settings for the Azure App Service Authentication / Authorization feature. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: :code:`true` if the Authentication / Authorization feature is + enabled for the current app; otherwise, :code:`false`. + :type enabled: bool + :param runtime_version: The RuntimeVersion of the Authentication / Authorization feature in use + for the current app. + The setting in this value can control the behavior of certain features in the Authentication / + Authorization module. + :type runtime_version: str + :param config_version: The ConfigVersion of the Authentication / Authorization feature in use + for the current app. + The setting in this value can control the behavior of the control plane for Authentication / + Authorization. + :type config_version: str + :param unauthenticated_client_action: The action to take when an unauthenticated client + attempts to access the app. Possible values include: "RedirectToLoginPage", "AllowAnonymous". + :type unauthenticated_client_action: str or + ~azure.mgmt.web.v2020_12_01.models.UnauthenticatedClientAction + :param token_store_enabled: :code:`true` to durably store platform-specific + security tokens that are obtained during login flows; otherwise, :code:`false`. + The default is :code:`false`. + :type token_store_enabled: bool + :param allowed_external_redirect_urls: External URLs that can be redirected to as part of + logging in or logging out of the app. Note that the query string part of the URL is ignored. + This is an advanced setting typically only needed by Windows Store application backends. + Note that URLs within the current domain are always implicitly allowed. + :type allowed_external_redirect_urls: list[str] + :param default_provider: The default authentication provider to use when multiple providers are + configured. + This setting is only needed if multiple providers are configured and the unauthenticated + client + action is set to "RedirectToLoginPage". Possible values include: "AzureActiveDirectory", + "Facebook", "Google", "MicrosoftAccount", "Twitter", "Github". + :type default_provider: str or ~azure.mgmt.web.v2020_12_01.models.BuiltInAuthenticationProvider + :param token_refresh_extension_hours: The number of hours after session token expiration that a + session token can be used to + call the token refresh API. The default is 72 hours. + :type token_refresh_extension_hours: float + :param client_id: The Client ID of this relying party application, known as the client_id. + This setting is required for enabling OpenID Connection authentication with Azure Active + Directory or + other 3rd party OpenID Connect providers. + More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + :type client_id: str + :param client_secret: The Client Secret of this relying party application (in Azure Active + Directory, this is also referred to as the Key). + This setting is optional. If no client secret is configured, the OpenID Connect implicit auth + flow is used to authenticate end users. + Otherwise, the OpenID Connect Authorization Code Flow is used to authenticate end users. + More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + :type client_secret: str + :param client_secret_setting_name: The app setting name that contains the client secret of the + relying party application. + :type client_secret_setting_name: str + :param client_secret_certificate_thumbprint: An alternative to the client secret, that is the + thumbprint of a certificate used for signing purposes. This property acts as + a replacement for the Client Secret. It is also optional. + :type client_secret_certificate_thumbprint: str + :param issuer: The OpenID Connect Issuer URI that represents the entity which issues access + tokens for this application. + When using Azure Active Directory, this value is the URI of the directory tenant, e.g. + https://sts.windows.net/{tenant-guid}/. + This URI is a case-sensitive identifier for the token issuer. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. + :type issuer: str + :param validate_issuer: Gets a value indicating whether the issuer should be a valid HTTPS url + and be validated as such. + :type validate_issuer: bool + :param allowed_audiences: Allowed audience values to consider when validating JWTs issued by + Azure Active Directory. Note that the :code:`ClientID` value is always considered + an + allowed audience, regardless of this setting. + :type allowed_audiences: list[str] + :param additional_login_params: Login parameters to send to the OpenID Connect authorization + endpoint when + a user logs in. Each parameter must be in the form "key=value". + :type additional_login_params: list[str] + :param aad_claims_authorization: Gets a JSON string containing the Azure AD Acl settings. + :type aad_claims_authorization: str + :param google_client_id: The OpenID Connect Client ID for the Google web application. + This setting is required for enabling Google Sign-In. + Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + :type google_client_id: str + :param google_client_secret: The client secret associated with the Google web application. + This setting is required for enabling Google Sign-In. + Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + :type google_client_secret: str + :param google_client_secret_setting_name: The app setting name that contains the client secret + associated with + the Google web application. + :type google_client_secret_setting_name: str + :param google_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Google + Sign-In authentication. + This setting is optional. If not specified, "openid", "profile", and "email" are used as + default scopes. + Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + :type google_o_auth_scopes: list[str] + :param facebook_app_id: The App ID of the Facebook app used for login. + This setting is required for enabling Facebook Login. + Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + :type facebook_app_id: str + :param facebook_app_secret: The App Secret of the Facebook app used for Facebook Login. + This setting is required for enabling Facebook Login. + Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + :type facebook_app_secret: str + :param facebook_app_secret_setting_name: The app setting name that contains the app secret used + for Facebook Login. + :type facebook_app_secret_setting_name: str + :param facebook_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Facebook + Login authentication. + This setting is optional. + Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + :type facebook_o_auth_scopes: list[str] + :param git_hub_client_id: The Client Id of the GitHub app used for login. + This setting is required for enabling Github login. + :type git_hub_client_id: str + :param git_hub_client_secret: The Client Secret of the GitHub app used for Github Login. + This setting is required for enabling Github login. + :type git_hub_client_secret: str + :param git_hub_client_secret_setting_name: The app setting name that contains the client secret + of the Github + app used for GitHub Login. + :type git_hub_client_secret_setting_name: str + :param git_hub_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of GitHub + Login authentication. + This setting is optional. + :type git_hub_o_auth_scopes: list[str] + :param twitter_consumer_key: The OAuth 1.0a consumer key of the Twitter application used for + sign-in. + This setting is required for enabling Twitter Sign-In. + Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in. + :type twitter_consumer_key: str + :param twitter_consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used + for sign-in. + This setting is required for enabling Twitter Sign-In. + Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in. + :type twitter_consumer_secret: str + :param twitter_consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a + consumer secret of the Twitter + application used for sign-in. + :type twitter_consumer_secret_setting_name: str + :param microsoft_account_client_id: The OAuth 2.0 client ID that was created for the app used + for authentication. + This setting is required for enabling Microsoft Account authentication. + Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + :type microsoft_account_client_id: str + :param microsoft_account_client_secret: The OAuth 2.0 client secret that was created for the + app used for authentication. + This setting is required for enabling Microsoft Account authentication. + Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + :type microsoft_account_client_secret: str + :param microsoft_account_client_secret_setting_name: The app setting name containing the OAuth + 2.0 client secret that was created for the + app used for authentication. + :type microsoft_account_client_secret_setting_name: str + :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of + Microsoft Account authentication. + This setting is optional. If not specified, "wl.basic" is used as the default scope. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. + :type microsoft_account_o_auth_scopes: list[str] + :param is_auth_from_file: "true" if the auth config settings should be read from a file, + "false" otherwise. + :type is_auth_from_file: str + :param auth_file_path: The path of the config file containing auth settings. + If the path is relative, base will the site's root directory. + :type auth_file_path: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'config_version': {'key': 'properties.configVersion', 'type': 'str'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'str'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'str'}, + 'token_refresh_extension_hours': {'key': 'properties.tokenRefreshExtensionHours', 'type': 'float'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + 'client_secret_certificate_thumbprint': {'key': 'properties.clientSecretCertificateThumbprint', 'type': 'str'}, + 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'validate_issuer': {'key': 'properties.validateIssuer', 'type': 'bool'}, + 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, + 'additional_login_params': {'key': 'properties.additionalLoginParams', 'type': '[str]'}, + 'aad_claims_authorization': {'key': 'properties.aadClaimsAuthorization', 'type': 'str'}, + 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, + 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, + 'google_client_secret_setting_name': {'key': 'properties.googleClientSecretSettingName', 'type': 'str'}, + 'google_o_auth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, + 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, + 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, + 'facebook_app_secret_setting_name': {'key': 'properties.facebookAppSecretSettingName', 'type': 'str'}, + 'facebook_o_auth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, + 'git_hub_client_id': {'key': 'properties.gitHubClientId', 'type': 'str'}, + 'git_hub_client_secret': {'key': 'properties.gitHubClientSecret', 'type': 'str'}, + 'git_hub_client_secret_setting_name': {'key': 'properties.gitHubClientSecretSettingName', 'type': 'str'}, + 'git_hub_o_auth_scopes': {'key': 'properties.gitHubOAuthScopes', 'type': '[str]'}, + 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, + 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, + 'twitter_consumer_secret_setting_name': {'key': 'properties.twitterConsumerSecretSettingName', 'type': 'str'}, + 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, + 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, + 'microsoft_account_client_secret_setting_name': {'key': 'properties.microsoftAccountClientSecretSettingName', 'type': 'str'}, + 'microsoft_account_o_auth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', 'type': '[str]'}, + 'is_auth_from_file': {'key': 'properties.isAuthFromFile', 'type': 'str'}, + 'auth_file_path': {'key': 'properties.authFilePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteAuthSettings, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.runtime_version = kwargs.get('runtime_version', None) + self.config_version = kwargs.get('config_version', None) + self.unauthenticated_client_action = kwargs.get('unauthenticated_client_action', None) + self.token_store_enabled = kwargs.get('token_store_enabled', None) + self.allowed_external_redirect_urls = kwargs.get('allowed_external_redirect_urls', None) + self.default_provider = kwargs.get('default_provider', None) + self.token_refresh_extension_hours = kwargs.get('token_refresh_extension_hours', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.client_secret_setting_name = kwargs.get('client_secret_setting_name', None) + self.client_secret_certificate_thumbprint = kwargs.get('client_secret_certificate_thumbprint', None) + self.issuer = kwargs.get('issuer', None) + self.validate_issuer = kwargs.get('validate_issuer', None) + self.allowed_audiences = kwargs.get('allowed_audiences', None) + self.additional_login_params = kwargs.get('additional_login_params', None) + self.aad_claims_authorization = kwargs.get('aad_claims_authorization', None) + self.google_client_id = kwargs.get('google_client_id', None) + self.google_client_secret = kwargs.get('google_client_secret', None) + self.google_client_secret_setting_name = kwargs.get('google_client_secret_setting_name', None) + self.google_o_auth_scopes = kwargs.get('google_o_auth_scopes', None) + self.facebook_app_id = kwargs.get('facebook_app_id', None) + self.facebook_app_secret = kwargs.get('facebook_app_secret', None) + self.facebook_app_secret_setting_name = kwargs.get('facebook_app_secret_setting_name', None) + self.facebook_o_auth_scopes = kwargs.get('facebook_o_auth_scopes', None) + self.git_hub_client_id = kwargs.get('git_hub_client_id', None) + self.git_hub_client_secret = kwargs.get('git_hub_client_secret', None) + self.git_hub_client_secret_setting_name = kwargs.get('git_hub_client_secret_setting_name', None) + self.git_hub_o_auth_scopes = kwargs.get('git_hub_o_auth_scopes', None) + self.twitter_consumer_key = kwargs.get('twitter_consumer_key', None) + self.twitter_consumer_secret = kwargs.get('twitter_consumer_secret', None) + self.twitter_consumer_secret_setting_name = kwargs.get('twitter_consumer_secret_setting_name', None) + self.microsoft_account_client_id = kwargs.get('microsoft_account_client_id', None) + self.microsoft_account_client_secret = kwargs.get('microsoft_account_client_secret', None) + self.microsoft_account_client_secret_setting_name = kwargs.get('microsoft_account_client_secret_setting_name', None) + self.microsoft_account_o_auth_scopes = kwargs.get('microsoft_account_o_auth_scopes', None) + self.is_auth_from_file = kwargs.get('is_auth_from_file', None) + self.auth_file_path = kwargs.get('auth_file_path', None) + + +class SiteAuthSettingsV2(ProxyOnlyResource): + """SiteAuthSettingsV2. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param platform: + :type platform: ~azure.mgmt.web.v2020_12_01.models.AuthPlatform + :param global_validation: + :type global_validation: ~azure.mgmt.web.v2020_12_01.models.GlobalValidation + :param identity_providers: + :type identity_providers: ~azure.mgmt.web.v2020_12_01.models.IdentityProviders + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.Login + :param http_settings: + :type http_settings: ~azure.mgmt.web.v2020_12_01.models.HttpSettings + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'platform': {'key': 'properties.platform', 'type': 'AuthPlatform'}, + 'global_validation': {'key': 'properties.globalValidation', 'type': 'GlobalValidation'}, + 'identity_providers': {'key': 'properties.identityProviders', 'type': 'IdentityProviders'}, + 'login': {'key': 'properties.login', 'type': 'Login'}, + 'http_settings': {'key': 'properties.httpSettings', 'type': 'HttpSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteAuthSettingsV2, self).__init__(**kwargs) + self.platform = kwargs.get('platform', None) + self.global_validation = kwargs.get('global_validation', None) + self.identity_providers = kwargs.get('identity_providers', None) + self.login = kwargs.get('login', None) + self.http_settings = kwargs.get('http_settings', None) + + +class SiteCloneability(msrest.serialization.Model): + """Represents whether or not an app is cloneable. + + :param result: Name of app. Possible values include: "Cloneable", "PartiallyCloneable", + "NotCloneable". + :type result: str or ~azure.mgmt.web.v2020_12_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent cloning. + :type blocking_features: list[~azure.mgmt.web.v2020_12_01.models.SiteCloneabilityCriterion] + :param unsupported_features: List of features enabled on app that are non-blocking but cannot + be cloned. The app can still be cloned + but the features in this list will not be set up on cloned app. + :type unsupported_features: list[~azure.mgmt.web.v2020_12_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2020_12_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'str'}, + 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteCloneability, self).__init__(**kwargs) + self.result = kwargs.get('result', None) + self.blocking_features = kwargs.get('blocking_features', None) + self.unsupported_features = kwargs.get('unsupported_features', None) + self.blocking_characteristics = kwargs.get('blocking_characteristics', None) + + +class SiteCloneabilityCriterion(msrest.serialization.Model): + """An app cloneability criterion. + + :param name: Name of criterion. + :type name: str + :param description: Description of criterion. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteCloneabilityCriterion, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + + +class SiteConfig(msrest.serialization.Model): + """Configuration of an App Service app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param number_of_workers: Number of workers. + :type number_of_workers: int + :param default_documents: Default documents. + :type default_documents: list[str] + :param net_framework_version: .NET Framework version. + :type net_framework_version: str + :param php_version: Version of PHP. + :type php_version: str + :param python_version: Version of Python. + :type python_version: str + :param node_version: Version of Node.js. + :type node_version: str + :param power_shell_version: Version of PowerShell. + :type power_shell_version: str + :param linux_fx_version: Linux App Framework and version. + :type linux_fx_version: str + :param windows_fx_version: Xenon App Framework and version. + :type windows_fx_version: str + :param request_tracing_enabled: :code:`true` if request tracing is enabled; + otherwise, :code:`false`. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: ~datetime.datetime + :param remote_debugging_enabled: :code:`true` if remote debugging is enabled; + otherwise, :code:`false`. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: :code:`true` if HTTP logging is enabled; otherwise, + :code:`false`. + :type http_logging_enabled: bool + :param logs_directory_size_limit: HTTP logs directory size limit. + :type logs_directory_size_limit: int + :param detailed_error_logging_enabled: :code:`true` if detailed error logging is + enabled; otherwise, :code:`false`. + :type detailed_error_logging_enabled: bool + :param publishing_username: Publishing user name. + :type publishing_username: str + :param app_settings: Application settings. + :type app_settings: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + :param azure_storage_accounts: List of Azure Storage Accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2020_12_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: list[~azure.mgmt.web.v2020_12_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_12_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: list[~azure.mgmt.web.v2020_12_01.models.HandlerMapping] + :param document_root: Document root. + :type document_root: str + :param scm_type: SCM type. Possible values include: "None", "Dropbox", "Tfs", "LocalGit", + "GitHub", "CodePlexGit", "CodePlexHg", "BitbucketGit", "BitbucketHg", "ExternalGit", + "ExternalHg", "OneDrive", "VSO", "VSTSRM". + :type scm_type: str or ~azure.mgmt.web.v2020_12_01.models.ScmType + :param use32_bit_worker_process: :code:`true` to use 32-bit worker process; + otherwise, :code:`false`. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: :code:`true` if WebSocket is enabled; otherwise, + :code:`false`. + :type web_sockets_enabled: bool + :param always_on: :code:`true` if Always On is enabled; otherwise, + :code:`false`. + :type always_on: bool + :param java_version: Java version. + :type java_version: str + :param java_container: Java container. + :type java_container: str + :param java_container_version: Java container version. + :type java_container_version: str + :param app_command_line: App command line to launch. + :type app_command_line: str + :param managed_pipeline_mode: Managed pipeline mode. Possible values include: "Integrated", + "Classic". + :type managed_pipeline_mode: str or ~azure.mgmt.web.v2020_12_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: list[~azure.mgmt.web.v2020_12_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: "WeightedRoundRobin", + "LeastRequests", "LeastResponseTime", "WeightedTotalTraffic", "RequestHash", + "PerSiteRoundRobin". + :type load_balancing: str or ~azure.mgmt.web.v2020_12_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_12_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_12_01.models.SiteLimits + :param auto_heal_enabled: :code:`true` if Auto Heal is enabled; otherwise, + :code:`false`. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_12_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param vnet_route_all_enabled: Virtual Network Route All enabled. This causes all outbound + traffic to have Virtual Network Security Groups and User Defined Routes applied. + :type vnet_route_all_enabled: bool + :param vnet_private_ports_count: The number of private ports assigned to this app. These will + be assigned dynamically on runtime. + :type vnet_private_ports_count: int + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2020_12_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :param api_definition: Information about the formal API definition for the app. + :type api_definition: ~azure.mgmt.web.v2020_12_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the app. + :type api_management_config: ~azure.mgmt.web.v2020_12_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: :code:`true` to enable local MySQL; otherwise, + :code:`false`. + :type local_my_sql_enabled: bool + :param managed_service_identity_id: Managed Service Identity Id. + :type managed_service_identity_id: int + :param x_managed_service_identity_id: Explicit Managed Service Identity Id. + :type x_managed_service_identity_id: int + :param key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :type key_vault_reference_identity: str + :param ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: list[~azure.mgmt.web.v2020_12_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_12_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions_use_main: IP security restrictions for scm to use main. + :type scm_ip_security_restrictions_use_main: bool + :param http20_enabled: Http20Enabled: configures a web site to allow clients to connect over + http2.0. + :type http20_enabled: bool + :param min_tls_version: MinTlsVersion: configures the minimum version of TLS required for SSL + requests. Possible values include: "1.0", "1.1", "1.2". + :type min_tls_version: str or ~azure.mgmt.web.v2020_12_01.models.SupportedTlsVersions + :param scm_min_tls_version: ScmMinTlsVersion: configures the minimum version of TLS required + for SSL requests for SCM site. Possible values include: "1.0", "1.1", "1.2". + :type scm_min_tls_version: str or ~azure.mgmt.web.v2020_12_01.models.SupportedTlsVersions + :param ftps_state: State of FTP / FTPS service. Possible values include: "AllAllowed", + "FtpsOnly", "Disabled". + :type ftps_state: str or ~azure.mgmt.web.v2020_12_01.models.FtpsState + :param pre_warmed_instance_count: Number of preWarmed instances. + This setting only applies to the Consumption and Elastic Plans. + :type pre_warmed_instance_count: int + :param function_app_scale_limit: Maximum number of workers that a site can scale out to. + This setting only applies to the Consumption and Elastic Premium Plans. + :type function_app_scale_limit: int + :param health_check_path: Health check path. + :type health_check_path: str + :param functions_runtime_scale_monitoring_enabled: Gets or sets a value indicating whether + functions runtime scale monitoring is enabled. When enabled, + the ScaleController will not monitor event sources directly, but will instead call to the + runtime to get scale status. + :type functions_runtime_scale_monitoring_enabled: bool + :param website_time_zone: Sets the time zone a site uses for generating timestamps. Compatible + with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence + over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a + quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, + expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows + NT\CurrentVersion\Time Zones. + :type website_time_zone: str + :param minimum_elastic_instance_count: Number of minimum instance count for a site + This setting only applies to the Elastic Plans. + :type minimum_elastic_instance_count: int + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, 'minimum': 0}, + 'function_app_scale_limit': {'minimum': 0}, + 'minimum_elastic_instance_count': {'maximum': 20, 'minimum': 0}, + } + + _attribute_map = { + 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, + 'default_documents': {'key': 'defaultDocuments', 'type': '[str]'}, + 'net_framework_version': {'key': 'netFrameworkVersion', 'type': 'str'}, + 'php_version': {'key': 'phpVersion', 'type': 'str'}, + 'python_version': {'key': 'pythonVersion', 'type': 'str'}, + 'node_version': {'key': 'nodeVersion', 'type': 'str'}, + 'power_shell_version': {'key': 'powerShellVersion', 'type': 'str'}, + 'linux_fx_version': {'key': 'linuxFxVersion', 'type': 'str'}, + 'windows_fx_version': {'key': 'windowsFxVersion', 'type': 'str'}, + 'request_tracing_enabled': {'key': 'requestTracingEnabled', 'type': 'bool'}, + 'request_tracing_expiration_time': {'key': 'requestTracingExpirationTime', 'type': 'iso-8601'}, + 'remote_debugging_enabled': {'key': 'remoteDebuggingEnabled', 'type': 'bool'}, + 'remote_debugging_version': {'key': 'remoteDebuggingVersion', 'type': 'str'}, + 'http_logging_enabled': {'key': 'httpLoggingEnabled', 'type': 'bool'}, + 'logs_directory_size_limit': {'key': 'logsDirectorySizeLimit', 'type': 'int'}, + 'detailed_error_logging_enabled': {'key': 'detailedErrorLoggingEnabled', 'type': 'bool'}, + 'publishing_username': {'key': 'publishingUsername', 'type': 'str'}, + 'app_settings': {'key': 'appSettings', 'type': '[NameValuePair]'}, + 'azure_storage_accounts': {'key': 'azureStorageAccounts', 'type': '{AzureStorageInfoValue}'}, + 'connection_strings': {'key': 'connectionStrings', 'type': '[ConnStringInfo]'}, + 'machine_key': {'key': 'machineKey', 'type': 'SiteMachineKey'}, + 'handler_mappings': {'key': 'handlerMappings', 'type': '[HandlerMapping]'}, + 'document_root': {'key': 'documentRoot', 'type': 'str'}, + 'scm_type': {'key': 'scmType', 'type': 'str'}, + 'use32_bit_worker_process': {'key': 'use32BitWorkerProcess', 'type': 'bool'}, + 'web_sockets_enabled': {'key': 'webSocketsEnabled', 'type': 'bool'}, + 'always_on': {'key': 'alwaysOn', 'type': 'bool'}, + 'java_version': {'key': 'javaVersion', 'type': 'str'}, + 'java_container': {'key': 'javaContainer', 'type': 'str'}, + 'java_container_version': {'key': 'javaContainerVersion', 'type': 'str'}, + 'app_command_line': {'key': 'appCommandLine', 'type': 'str'}, + 'managed_pipeline_mode': {'key': 'managedPipelineMode', 'type': 'str'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'str'}, + 'experiments': {'key': 'experiments', 'type': 'Experiments'}, + 'limits': {'key': 'limits', 'type': 'SiteLimits'}, + 'auto_heal_enabled': {'key': 'autoHealEnabled', 'type': 'bool'}, + 'auto_heal_rules': {'key': 'autoHealRules', 'type': 'AutoHealRules'}, + 'tracing_options': {'key': 'tracingOptions', 'type': 'str'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_route_all_enabled': {'key': 'vnetRouteAllEnabled', 'type': 'bool'}, + 'vnet_private_ports_count': {'key': 'vnetPrivatePortsCount', 'type': 'int'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'api_management_config': {'key': 'apiManagementConfig', 'type': 'ApiManagementConfig'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'managed_service_identity_id': {'key': 'managedServiceIdentityId', 'type': 'int'}, + 'x_managed_service_identity_id': {'key': 'xManagedServiceIdentityId', 'type': 'int'}, + 'key_vault_reference_identity': {'key': 'keyVaultReferenceIdentity', 'type': 'str'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions': {'key': 'scmIpSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions_use_main': {'key': 'scmIpSecurityRestrictionsUseMain', 'type': 'bool'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + 'scm_min_tls_version': {'key': 'scmMinTlsVersion', 'type': 'str'}, + 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, + 'pre_warmed_instance_count': {'key': 'preWarmedInstanceCount', 'type': 'int'}, + 'function_app_scale_limit': {'key': 'functionAppScaleLimit', 'type': 'int'}, + 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, + 'functions_runtime_scale_monitoring_enabled': {'key': 'functionsRuntimeScaleMonitoringEnabled', 'type': 'bool'}, + 'website_time_zone': {'key': 'websiteTimeZone', 'type': 'str'}, + 'minimum_elastic_instance_count': {'key': 'minimumElasticInstanceCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteConfig, self).__init__(**kwargs) + self.number_of_workers = kwargs.get('number_of_workers', None) + self.default_documents = kwargs.get('default_documents', None) + self.net_framework_version = kwargs.get('net_framework_version', "v4.6") + self.php_version = kwargs.get('php_version', None) + self.python_version = kwargs.get('python_version', None) + self.node_version = kwargs.get('node_version', None) + self.power_shell_version = kwargs.get('power_shell_version', None) + self.linux_fx_version = kwargs.get('linux_fx_version', None) + self.windows_fx_version = kwargs.get('windows_fx_version', None) + self.request_tracing_enabled = kwargs.get('request_tracing_enabled', None) + self.request_tracing_expiration_time = kwargs.get('request_tracing_expiration_time', None) + self.remote_debugging_enabled = kwargs.get('remote_debugging_enabled', None) + self.remote_debugging_version = kwargs.get('remote_debugging_version', None) + self.http_logging_enabled = kwargs.get('http_logging_enabled', None) + self.logs_directory_size_limit = kwargs.get('logs_directory_size_limit', None) + self.detailed_error_logging_enabled = kwargs.get('detailed_error_logging_enabled', None) + self.publishing_username = kwargs.get('publishing_username', None) + self.app_settings = kwargs.get('app_settings', None) + self.azure_storage_accounts = kwargs.get('azure_storage_accounts', None) + self.connection_strings = kwargs.get('connection_strings', None) + self.machine_key = None + self.handler_mappings = kwargs.get('handler_mappings', None) + self.document_root = kwargs.get('document_root', None) + self.scm_type = kwargs.get('scm_type', None) + self.use32_bit_worker_process = kwargs.get('use32_bit_worker_process', None) + self.web_sockets_enabled = kwargs.get('web_sockets_enabled', None) + self.always_on = kwargs.get('always_on', None) + self.java_version = kwargs.get('java_version', None) + self.java_container = kwargs.get('java_container', None) + self.java_container_version = kwargs.get('java_container_version', None) + self.app_command_line = kwargs.get('app_command_line', None) + self.managed_pipeline_mode = kwargs.get('managed_pipeline_mode', None) + self.virtual_applications = kwargs.get('virtual_applications', None) + self.load_balancing = kwargs.get('load_balancing', None) + self.experiments = kwargs.get('experiments', None) + self.limits = kwargs.get('limits', None) + self.auto_heal_enabled = kwargs.get('auto_heal_enabled', None) + self.auto_heal_rules = kwargs.get('auto_heal_rules', None) + self.tracing_options = kwargs.get('tracing_options', None) + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_route_all_enabled = kwargs.get('vnet_route_all_enabled', None) + self.vnet_private_ports_count = kwargs.get('vnet_private_ports_count', None) + self.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', None) + self.api_management_config = kwargs.get('api_management_config', None) + self.auto_swap_slot_name = kwargs.get('auto_swap_slot_name', None) + self.local_my_sql_enabled = kwargs.get('local_my_sql_enabled', False) + self.managed_service_identity_id = kwargs.get('managed_service_identity_id', None) + self.x_managed_service_identity_id = kwargs.get('x_managed_service_identity_id', None) + self.key_vault_reference_identity = kwargs.get('key_vault_reference_identity', None) + self.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) + self.scm_ip_security_restrictions = kwargs.get('scm_ip_security_restrictions', None) + self.scm_ip_security_restrictions_use_main = kwargs.get('scm_ip_security_restrictions_use_main', None) + self.http20_enabled = kwargs.get('http20_enabled', True) + self.min_tls_version = kwargs.get('min_tls_version', None) + self.scm_min_tls_version = kwargs.get('scm_min_tls_version', None) + self.ftps_state = kwargs.get('ftps_state', None) + self.pre_warmed_instance_count = kwargs.get('pre_warmed_instance_count', None) + self.function_app_scale_limit = kwargs.get('function_app_scale_limit', None) + self.health_check_path = kwargs.get('health_check_path', None) + self.functions_runtime_scale_monitoring_enabled = kwargs.get('functions_runtime_scale_monitoring_enabled', None) + self.website_time_zone = kwargs.get('website_time_zone', None) + self.minimum_elastic_instance_count = kwargs.get('minimum_elastic_instance_count', None) + + +class SiteConfigPropertiesDictionary(msrest.serialization.Model): + """Site config properties dictionary. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar use32_bit_worker_process: :code:`true` if use32BitWorkerProcess should be + set to true for the stack; otherwise, :code:`false`. + :vartype use32_bit_worker_process: bool + :ivar linux_fx_version: LinuxFxVersion configuration setting. + :vartype linux_fx_version: str + :ivar java_version: JavaVersion configuration setting. + :vartype java_version: str + :ivar power_shell_version: PowerShellVersion configuration setting. + :vartype power_shell_version: str + """ + + _validation = { + 'use32_bit_worker_process': {'readonly': True}, + 'linux_fx_version': {'readonly': True}, + 'java_version': {'readonly': True}, + 'power_shell_version': {'readonly': True}, + } + + _attribute_map = { + 'use32_bit_worker_process': {'key': 'use32BitWorkerProcess', 'type': 'bool'}, + 'linux_fx_version': {'key': 'linuxFxVersion', 'type': 'str'}, + 'java_version': {'key': 'javaVersion', 'type': 'str'}, + 'power_shell_version': {'key': 'powerShellVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteConfigPropertiesDictionary, self).__init__(**kwargs) + self.use32_bit_worker_process = None + self.linux_fx_version = None + self.java_version = None + self.power_shell_version = None + + +class SiteConfigResource(ProxyOnlyResource): + """Web app configuration ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param number_of_workers: Number of workers. + :type number_of_workers: int + :param default_documents: Default documents. + :type default_documents: list[str] + :param net_framework_version: .NET Framework version. + :type net_framework_version: str + :param php_version: Version of PHP. + :type php_version: str + :param python_version: Version of Python. + :type python_version: str + :param node_version: Version of Node.js. + :type node_version: str + :param power_shell_version: Version of PowerShell. + :type power_shell_version: str + :param linux_fx_version: Linux App Framework and version. + :type linux_fx_version: str + :param windows_fx_version: Xenon App Framework and version. + :type windows_fx_version: str + :param request_tracing_enabled: :code:`true` if request tracing is enabled; + otherwise, :code:`false`. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: ~datetime.datetime + :param remote_debugging_enabled: :code:`true` if remote debugging is enabled; + otherwise, :code:`false`. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: :code:`true` if HTTP logging is enabled; otherwise, + :code:`false`. + :type http_logging_enabled: bool + :param logs_directory_size_limit: HTTP logs directory size limit. + :type logs_directory_size_limit: int + :param detailed_error_logging_enabled: :code:`true` if detailed error logging is + enabled; otherwise, :code:`false`. + :type detailed_error_logging_enabled: bool + :param publishing_username: Publishing user name. + :type publishing_username: str + :param app_settings: Application settings. + :type app_settings: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + :param azure_storage_accounts: List of Azure Storage Accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2020_12_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: list[~azure.mgmt.web.v2020_12_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_12_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: list[~azure.mgmt.web.v2020_12_01.models.HandlerMapping] + :param document_root: Document root. + :type document_root: str + :param scm_type: SCM type. Possible values include: "None", "Dropbox", "Tfs", "LocalGit", + "GitHub", "CodePlexGit", "CodePlexHg", "BitbucketGit", "BitbucketHg", "ExternalGit", + "ExternalHg", "OneDrive", "VSO", "VSTSRM". + :type scm_type: str or ~azure.mgmt.web.v2020_12_01.models.ScmType + :param use32_bit_worker_process: :code:`true` to use 32-bit worker process; + otherwise, :code:`false`. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: :code:`true` if WebSocket is enabled; otherwise, + :code:`false`. + :type web_sockets_enabled: bool + :param always_on: :code:`true` if Always On is enabled; otherwise, + :code:`false`. + :type always_on: bool + :param java_version: Java version. + :type java_version: str + :param java_container: Java container. + :type java_container: str + :param java_container_version: Java container version. + :type java_container_version: str + :param app_command_line: App command line to launch. + :type app_command_line: str + :param managed_pipeline_mode: Managed pipeline mode. Possible values include: "Integrated", + "Classic". + :type managed_pipeline_mode: str or ~azure.mgmt.web.v2020_12_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: list[~azure.mgmt.web.v2020_12_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: "WeightedRoundRobin", + "LeastRequests", "LeastResponseTime", "WeightedTotalTraffic", "RequestHash", + "PerSiteRoundRobin". + :type load_balancing: str or ~azure.mgmt.web.v2020_12_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_12_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_12_01.models.SiteLimits + :param auto_heal_enabled: :code:`true` if Auto Heal is enabled; otherwise, + :code:`false`. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_12_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param vnet_route_all_enabled: Virtual Network Route All enabled. This causes all outbound + traffic to have Virtual Network Security Groups and User Defined Routes applied. + :type vnet_route_all_enabled: bool + :param vnet_private_ports_count: The number of private ports assigned to this app. These will + be assigned dynamically on runtime. + :type vnet_private_ports_count: int + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2020_12_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :param api_definition: Information about the formal API definition for the app. + :type api_definition: ~azure.mgmt.web.v2020_12_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the app. + :type api_management_config: ~azure.mgmt.web.v2020_12_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: :code:`true` to enable local MySQL; otherwise, + :code:`false`. + :type local_my_sql_enabled: bool + :param managed_service_identity_id: Managed Service Identity Id. + :type managed_service_identity_id: int + :param x_managed_service_identity_id: Explicit Managed Service Identity Id. + :type x_managed_service_identity_id: int + :param key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :type key_vault_reference_identity: str + :param ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: list[~azure.mgmt.web.v2020_12_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_12_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions_use_main: IP security restrictions for scm to use main. + :type scm_ip_security_restrictions_use_main: bool + :param http20_enabled: Http20Enabled: configures a web site to allow clients to connect over + http2.0. + :type http20_enabled: bool + :param min_tls_version: MinTlsVersion: configures the minimum version of TLS required for SSL + requests. Possible values include: "1.0", "1.1", "1.2". + :type min_tls_version: str or ~azure.mgmt.web.v2020_12_01.models.SupportedTlsVersions + :param scm_min_tls_version: ScmMinTlsVersion: configures the minimum version of TLS required + for SSL requests for SCM site. Possible values include: "1.0", "1.1", "1.2". + :type scm_min_tls_version: str or ~azure.mgmt.web.v2020_12_01.models.SupportedTlsVersions + :param ftps_state: State of FTP / FTPS service. Possible values include: "AllAllowed", + "FtpsOnly", "Disabled". + :type ftps_state: str or ~azure.mgmt.web.v2020_12_01.models.FtpsState + :param pre_warmed_instance_count: Number of preWarmed instances. + This setting only applies to the Consumption and Elastic Plans. + :type pre_warmed_instance_count: int + :param function_app_scale_limit: Maximum number of workers that a site can scale out to. + This setting only applies to the Consumption and Elastic Premium Plans. + :type function_app_scale_limit: int + :param health_check_path: Health check path. + :type health_check_path: str + :param functions_runtime_scale_monitoring_enabled: Gets or sets a value indicating whether + functions runtime scale monitoring is enabled. When enabled, + the ScaleController will not monitor event sources directly, but will instead call to the + runtime to get scale status. + :type functions_runtime_scale_monitoring_enabled: bool + :param website_time_zone: Sets the time zone a site uses for generating timestamps. Compatible + with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence + over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a + quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, + expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows + NT\CurrentVersion\Time Zones. + :type website_time_zone: str + :param minimum_elastic_instance_count: Number of minimum instance count for a site + This setting only applies to the Elastic Plans. + :type minimum_elastic_instance_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, 'minimum': 0}, + 'function_app_scale_limit': {'minimum': 0}, + 'minimum_elastic_instance_count': {'maximum': 20, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'number_of_workers': {'key': 'properties.numberOfWorkers', 'type': 'int'}, + 'default_documents': {'key': 'properties.defaultDocuments', 'type': '[str]'}, + 'net_framework_version': {'key': 'properties.netFrameworkVersion', 'type': 'str'}, + 'php_version': {'key': 'properties.phpVersion', 'type': 'str'}, + 'python_version': {'key': 'properties.pythonVersion', 'type': 'str'}, + 'node_version': {'key': 'properties.nodeVersion', 'type': 'str'}, + 'power_shell_version': {'key': 'properties.powerShellVersion', 'type': 'str'}, + 'linux_fx_version': {'key': 'properties.linuxFxVersion', 'type': 'str'}, + 'windows_fx_version': {'key': 'properties.windowsFxVersion', 'type': 'str'}, + 'request_tracing_enabled': {'key': 'properties.requestTracingEnabled', 'type': 'bool'}, + 'request_tracing_expiration_time': {'key': 'properties.requestTracingExpirationTime', 'type': 'iso-8601'}, + 'remote_debugging_enabled': {'key': 'properties.remoteDebuggingEnabled', 'type': 'bool'}, + 'remote_debugging_version': {'key': 'properties.remoteDebuggingVersion', 'type': 'str'}, + 'http_logging_enabled': {'key': 'properties.httpLoggingEnabled', 'type': 'bool'}, + 'logs_directory_size_limit': {'key': 'properties.logsDirectorySizeLimit', 'type': 'int'}, + 'detailed_error_logging_enabled': {'key': 'properties.detailedErrorLoggingEnabled', 'type': 'bool'}, + 'publishing_username': {'key': 'properties.publishingUsername', 'type': 'str'}, + 'app_settings': {'key': 'properties.appSettings', 'type': '[NameValuePair]'}, + 'azure_storage_accounts': {'key': 'properties.azureStorageAccounts', 'type': '{AzureStorageInfoValue}'}, + 'connection_strings': {'key': 'properties.connectionStrings', 'type': '[ConnStringInfo]'}, + 'machine_key': {'key': 'properties.machineKey', 'type': 'SiteMachineKey'}, + 'handler_mappings': {'key': 'properties.handlerMappings', 'type': '[HandlerMapping]'}, + 'document_root': {'key': 'properties.documentRoot', 'type': 'str'}, + 'scm_type': {'key': 'properties.scmType', 'type': 'str'}, + 'use32_bit_worker_process': {'key': 'properties.use32BitWorkerProcess', 'type': 'bool'}, + 'web_sockets_enabled': {'key': 'properties.webSocketsEnabled', 'type': 'bool'}, + 'always_on': {'key': 'properties.alwaysOn', 'type': 'bool'}, + 'java_version': {'key': 'properties.javaVersion', 'type': 'str'}, + 'java_container': {'key': 'properties.javaContainer', 'type': 'str'}, + 'java_container_version': {'key': 'properties.javaContainerVersion', 'type': 'str'}, + 'app_command_line': {'key': 'properties.appCommandLine', 'type': 'str'}, + 'managed_pipeline_mode': {'key': 'properties.managedPipelineMode', 'type': 'str'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'str'}, + 'experiments': {'key': 'properties.experiments', 'type': 'Experiments'}, + 'limits': {'key': 'properties.limits', 'type': 'SiteLimits'}, + 'auto_heal_enabled': {'key': 'properties.autoHealEnabled', 'type': 'bool'}, + 'auto_heal_rules': {'key': 'properties.autoHealRules', 'type': 'AutoHealRules'}, + 'tracing_options': {'key': 'properties.tracingOptions', 'type': 'str'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_route_all_enabled': {'key': 'properties.vnetRouteAllEnabled', 'type': 'bool'}, + 'vnet_private_ports_count': {'key': 'properties.vnetPrivatePortsCount', 'type': 'int'}, + 'cors': {'key': 'properties.cors', 'type': 'CorsSettings'}, + 'push': {'key': 'properties.push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'api_management_config': {'key': 'properties.apiManagementConfig', 'type': 'ApiManagementConfig'}, + 'auto_swap_slot_name': {'key': 'properties.autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + 'managed_service_identity_id': {'key': 'properties.managedServiceIdentityId', 'type': 'int'}, + 'x_managed_service_identity_id': {'key': 'properties.xManagedServiceIdentityId', 'type': 'int'}, + 'key_vault_reference_identity': {'key': 'properties.keyVaultReferenceIdentity', 'type': 'str'}, + 'ip_security_restrictions': {'key': 'properties.ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions': {'key': 'properties.scmIpSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions_use_main': {'key': 'properties.scmIpSecurityRestrictionsUseMain', 'type': 'bool'}, + 'http20_enabled': {'key': 'properties.http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'properties.minTlsVersion', 'type': 'str'}, + 'scm_min_tls_version': {'key': 'properties.scmMinTlsVersion', 'type': 'str'}, + 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, + 'pre_warmed_instance_count': {'key': 'properties.preWarmedInstanceCount', 'type': 'int'}, + 'function_app_scale_limit': {'key': 'properties.functionAppScaleLimit', 'type': 'int'}, + 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, + 'functions_runtime_scale_monitoring_enabled': {'key': 'properties.functionsRuntimeScaleMonitoringEnabled', 'type': 'bool'}, + 'website_time_zone': {'key': 'properties.websiteTimeZone', 'type': 'str'}, + 'minimum_elastic_instance_count': {'key': 'properties.minimumElasticInstanceCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteConfigResource, self).__init__(**kwargs) + self.number_of_workers = kwargs.get('number_of_workers', None) + self.default_documents = kwargs.get('default_documents', None) + self.net_framework_version = kwargs.get('net_framework_version', "v4.6") + self.php_version = kwargs.get('php_version', None) + self.python_version = kwargs.get('python_version', None) + self.node_version = kwargs.get('node_version', None) + self.power_shell_version = kwargs.get('power_shell_version', None) + self.linux_fx_version = kwargs.get('linux_fx_version', None) + self.windows_fx_version = kwargs.get('windows_fx_version', None) + self.request_tracing_enabled = kwargs.get('request_tracing_enabled', None) + self.request_tracing_expiration_time = kwargs.get('request_tracing_expiration_time', None) + self.remote_debugging_enabled = kwargs.get('remote_debugging_enabled', None) + self.remote_debugging_version = kwargs.get('remote_debugging_version', None) + self.http_logging_enabled = kwargs.get('http_logging_enabled', None) + self.logs_directory_size_limit = kwargs.get('logs_directory_size_limit', None) + self.detailed_error_logging_enabled = kwargs.get('detailed_error_logging_enabled', None) + self.publishing_username = kwargs.get('publishing_username', None) + self.app_settings = kwargs.get('app_settings', None) + self.azure_storage_accounts = kwargs.get('azure_storage_accounts', None) + self.connection_strings = kwargs.get('connection_strings', None) + self.machine_key = None + self.handler_mappings = kwargs.get('handler_mappings', None) + self.document_root = kwargs.get('document_root', None) + self.scm_type = kwargs.get('scm_type', None) + self.use32_bit_worker_process = kwargs.get('use32_bit_worker_process', None) + self.web_sockets_enabled = kwargs.get('web_sockets_enabled', None) + self.always_on = kwargs.get('always_on', None) + self.java_version = kwargs.get('java_version', None) + self.java_container = kwargs.get('java_container', None) + self.java_container_version = kwargs.get('java_container_version', None) + self.app_command_line = kwargs.get('app_command_line', None) + self.managed_pipeline_mode = kwargs.get('managed_pipeline_mode', None) + self.virtual_applications = kwargs.get('virtual_applications', None) + self.load_balancing = kwargs.get('load_balancing', None) + self.experiments = kwargs.get('experiments', None) + self.limits = kwargs.get('limits', None) + self.auto_heal_enabled = kwargs.get('auto_heal_enabled', None) + self.auto_heal_rules = kwargs.get('auto_heal_rules', None) + self.tracing_options = kwargs.get('tracing_options', None) + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_route_all_enabled = kwargs.get('vnet_route_all_enabled', None) + self.vnet_private_ports_count = kwargs.get('vnet_private_ports_count', None) + self.cors = kwargs.get('cors', None) + self.push = kwargs.get('push', None) + self.api_definition = kwargs.get('api_definition', None) + self.api_management_config = kwargs.get('api_management_config', None) + self.auto_swap_slot_name = kwargs.get('auto_swap_slot_name', None) + self.local_my_sql_enabled = kwargs.get('local_my_sql_enabled', False) + self.managed_service_identity_id = kwargs.get('managed_service_identity_id', None) + self.x_managed_service_identity_id = kwargs.get('x_managed_service_identity_id', None) + self.key_vault_reference_identity = kwargs.get('key_vault_reference_identity', None) + self.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) + self.scm_ip_security_restrictions = kwargs.get('scm_ip_security_restrictions', None) + self.scm_ip_security_restrictions_use_main = kwargs.get('scm_ip_security_restrictions_use_main', None) + self.http20_enabled = kwargs.get('http20_enabled', True) + self.min_tls_version = kwargs.get('min_tls_version', None) + self.scm_min_tls_version = kwargs.get('scm_min_tls_version', None) + self.ftps_state = kwargs.get('ftps_state', None) + self.pre_warmed_instance_count = kwargs.get('pre_warmed_instance_count', None) + self.function_app_scale_limit = kwargs.get('function_app_scale_limit', None) + self.health_check_path = kwargs.get('health_check_path', None) + self.functions_runtime_scale_monitoring_enabled = kwargs.get('functions_runtime_scale_monitoring_enabled', None) + self.website_time_zone = kwargs.get('website_time_zone', None) + self.minimum_elastic_instance_count = kwargs.get('minimum_elastic_instance_count', None) + + +class SiteConfigResourceCollection(msrest.serialization.Model): + """Collection of site configurations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SiteConfigResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SiteConfigResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteConfigResourceCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class SiteConfigurationSnapshotInfo(ProxyOnlyResource): + """A snapshot of a web app configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar time: The time the snapshot was taken. + :vartype time: ~datetime.datetime + :ivar snapshot_id: The id of the snapshot. + :vartype snapshot_id: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'time': {'readonly': True}, + 'snapshot_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time': {'key': 'properties.time', 'type': 'iso-8601'}, + 'snapshot_id': {'key': 'properties.snapshotId', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteConfigurationSnapshotInfo, self).__init__(**kwargs) + self.time = None + self.snapshot_id = None + + +class SiteConfigurationSnapshotInfoCollection(msrest.serialization.Model): + """Collection of metadata for the app configuration snapshots that can be restored. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteConfigurationSnapshotInfoCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class SiteExtensionInfo(ProxyOnlyResource): + """Site Extension Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param extension_id: Site extension ID. + :type extension_id: str + :param title: + :type title: str + :param extension_type: Site extension type. Possible values include: "Gallery", "WebRoot". + :type extension_type: str or ~azure.mgmt.web.v2020_12_01.models.SiteExtensionType + :param summary: Summary description. + :type summary: str + :param description: Detailed description. + :type description: str + :param version: Version information. + :type version: str + :param extension_url: Extension URL. + :type extension_url: str + :param project_url: Project URL. + :type project_url: str + :param icon_url: Icon URL. + :type icon_url: str + :param license_url: License URL. + :type license_url: str + :param feed_url: Feed URL. + :type feed_url: str + :param authors: List of authors. + :type authors: list[str] + :param installer_command_line_params: Installer command line parameters. + :type installer_command_line_params: str + :param published_date_time: Published timestamp. + :type published_date_time: ~datetime.datetime + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: :code:`true` if the local version is the latest + version; :code:`false` otherwise. + :type local_is_latest_version: bool + :param local_path: Local path. + :type local_path: str + :param installed_date_time: Installed timestamp. + :type installed_date_time: ~datetime.datetime + :param provisioning_state: Provisioning state. + :type provisioning_state: str + :param comment: Site Extension comment. + :type comment: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'extension_id': {'key': 'properties.extension_id', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'extension_type': {'key': 'properties.extension_type', 'type': 'str'}, + 'summary': {'key': 'properties.summary', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'extension_url': {'key': 'properties.extension_url', 'type': 'str'}, + 'project_url': {'key': 'properties.project_url', 'type': 'str'}, + 'icon_url': {'key': 'properties.icon_url', 'type': 'str'}, + 'license_url': {'key': 'properties.license_url', 'type': 'str'}, + 'feed_url': {'key': 'properties.feed_url', 'type': 'str'}, + 'authors': {'key': 'properties.authors', 'type': '[str]'}, + 'installer_command_line_params': {'key': 'properties.installer_command_line_params', 'type': 'str'}, + 'published_date_time': {'key': 'properties.published_date_time', 'type': 'iso-8601'}, + 'download_count': {'key': 'properties.download_count', 'type': 'int'}, + 'local_is_latest_version': {'key': 'properties.local_is_latest_version', 'type': 'bool'}, + 'local_path': {'key': 'properties.local_path', 'type': 'str'}, + 'installed_date_time': {'key': 'properties.installed_date_time', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'comment': {'key': 'properties.comment', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteExtensionInfo, self).__init__(**kwargs) + self.extension_id = kwargs.get('extension_id', None) + self.title = kwargs.get('title', None) + self.extension_type = kwargs.get('extension_type', None) + self.summary = kwargs.get('summary', None) + self.description = kwargs.get('description', None) + self.version = kwargs.get('version', None) + self.extension_url = kwargs.get('extension_url', None) + self.project_url = kwargs.get('project_url', None) + self.icon_url = kwargs.get('icon_url', None) + self.license_url = kwargs.get('license_url', None) + self.feed_url = kwargs.get('feed_url', None) + self.authors = kwargs.get('authors', None) + self.installer_command_line_params = kwargs.get('installer_command_line_params', None) + self.published_date_time = kwargs.get('published_date_time', None) + self.download_count = kwargs.get('download_count', None) + self.local_is_latest_version = kwargs.get('local_is_latest_version', None) + self.local_path = kwargs.get('local_path', None) + self.installed_date_time = kwargs.get('installed_date_time', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.comment = kwargs.get('comment', None) + + +class SiteExtensionInfoCollection(msrest.serialization.Model): + """Collection of Kudu site extension information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SiteExtensionInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteExtensionInfoCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class SiteLimits(msrest.serialization.Model): + """Metric limits set on an app. + + :param max_percentage_cpu: Maximum allowed CPU usage percentage. + :type max_percentage_cpu: float + :param max_memory_in_mb: Maximum allowed memory usage in MB. + :type max_memory_in_mb: long + :param max_disk_size_in_mb: Maximum allowed disk size usage in MB. + :type max_disk_size_in_mb: long + """ + + _attribute_map = { + 'max_percentage_cpu': {'key': 'maxPercentageCpu', 'type': 'float'}, + 'max_memory_in_mb': {'key': 'maxMemoryInMb', 'type': 'long'}, + 'max_disk_size_in_mb': {'key': 'maxDiskSizeInMb', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteLimits, self).__init__(**kwargs) + self.max_percentage_cpu = kwargs.get('max_percentage_cpu', None) + self.max_memory_in_mb = kwargs.get('max_memory_in_mb', None) + self.max_disk_size_in_mb = kwargs.get('max_disk_size_in_mb', None) + + +class SiteLogsConfig(ProxyOnlyResource): + """Configuration of App Service site logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param application_logs: Application logs configuration. + :type application_logs: ~azure.mgmt.web.v2020_12_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2020_12_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: ~azure.mgmt.web.v2020_12_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: ~azure.mgmt.web.v2020_12_01.models.EnabledConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'application_logs': {'key': 'properties.applicationLogs', 'type': 'ApplicationLogsConfig'}, + 'http_logs': {'key': 'properties.httpLogs', 'type': 'HttpLogsConfig'}, + 'failed_requests_tracing': {'key': 'properties.failedRequestsTracing', 'type': 'EnabledConfig'}, + 'detailed_error_messages': {'key': 'properties.detailedErrorMessages', 'type': 'EnabledConfig'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteLogsConfig, self).__init__(**kwargs) + self.application_logs = kwargs.get('application_logs', None) + self.http_logs = kwargs.get('http_logs', None) + self.failed_requests_tracing = kwargs.get('failed_requests_tracing', None) + self.detailed_error_messages = kwargs.get('detailed_error_messages', None) + + +class SiteMachineKey(msrest.serialization.Model): + """MachineKey of an app. + + :param validation: MachineKey validation. + :type validation: str + :param validation_key: Validation key. + :type validation_key: str + :param decryption: Algorithm used for decryption. + :type decryption: str + :param decryption_key: Decryption key. + :type decryption_key: str + """ + + _attribute_map = { + 'validation': {'key': 'validation', 'type': 'str'}, + 'validation_key': {'key': 'validationKey', 'type': 'str'}, + 'decryption': {'key': 'decryption', 'type': 'str'}, + 'decryption_key': {'key': 'decryptionKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteMachineKey, self).__init__(**kwargs) + self.validation = kwargs.get('validation', None) + self.validation_key = kwargs.get('validation_key', None) + self.decryption = kwargs.get('decryption', None) + self.decryption_key = kwargs.get('decryption_key', None) + + +class SitePatchResource(ProxyOnlyResource): + """ARM resource for a site. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param identity: Managed service identity. + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :ivar state: Current state of the app. + :vartype state: str + :ivar host_names: Hostnames associated with the app. + :vartype host_names: list[str] + :ivar repository_site_name: Name of the repository site. + :vartype repository_site_name: str + :ivar usage_state: State indicating whether the app has exceeded its quota usage. Read-only. + Possible values include: "Normal", "Exceeded". + :vartype usage_state: str or ~azure.mgmt.web.v2020_12_01.models.UsageState + :param enabled: :code:`true` if the app is enabled; otherwise, + :code:`false`. Setting this value to false disables the app (takes the app + offline). + :type enabled: bool + :ivar enabled_host_names: Enabled hostnames for the app.Hostnames need to be assigned (see + HostNames) AND enabled. Otherwise, + the app is not served on those hostnames. + :vartype enabled_host_names: list[str] + :ivar availability_state: Management information availability state for the app. Possible + values include: "Normal", "Limited", "DisasterRecoveryMode". + :vartype availability_state: str or ~azure.mgmt.web.v2020_12_01.models.SiteAvailabilityState + :param host_name_ssl_states: Hostname SSL states are used to manage the SSL bindings for app's + hostnames. + :type host_name_ssl_states: list[~azure.mgmt.web.v2020_12_01.models.HostNameSslState] + :param server_farm_id: Resource ID of the associated App Service plan, formatted as: + "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + :type server_farm_id: str + :param reserved: :code:`true` if reserved; otherwise, :code:`false`. + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. + :type hyper_v: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. + :vartype last_modified_time_utc: ~datetime.datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfig + :ivar traffic_manager_host_names: Azure Traffic Manager hostnames associated with the app. + Read-only. + :vartype traffic_manager_host_names: list[str] + :param scm_site_also_stopped: :code:`true` to stop SCM (KUDU) site when the app is + stopped; otherwise, :code:`false`. The default is :code:`false`. + :type scm_site_also_stopped: bool + :ivar target_swap_slot: Specifies which deployment slot this app will swap into. Read-only. + :vartype target_swap_slot: str + :param hosting_environment_profile: App Service Environment to use for the app. + :type hosting_environment_profile: ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: :code:`true` to enable client affinity; + :code:`false` to stop sending session affinity cookies, which route client + requests in the same session to the same instance. Default is :code:`true`. + :type client_affinity_enabled: bool + :param client_cert_enabled: :code:`true` to enable client certificate + authentication (TLS mutual authentication); otherwise, :code:`false`. Default is + :code:`false`. + :type client_cert_enabled: bool + :param client_cert_mode: This composes with ClientCertEnabled setting. + + + * ClientCertEnabled: false means ClientCert is ignored. + * ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or + accepted. Possible values include: "Required", "Optional", "OptionalInteractiveUser". + :type client_cert_mode: str or ~azure.mgmt.web.v2020_12_01.models.ClientCertMode + :param client_cert_exclusion_paths: client certificate authentication comma-separated exclusion + paths. + :type client_cert_exclusion_paths: str + :param host_names_disabled: :code:`true` to disable the public hostnames of the + app; otherwise, :code:`false`. + If :code:`true`, the app is only accessible via API management process. + :type host_names_disabled: bool + :param custom_domain_verification_id: Unique identifier that verifies the custom domains + assigned to the app. Customer will add this id to a txt record for verification. + :type custom_domain_verification_id: str + :ivar outbound_ip_addresses: List of IP addresses that the app uses for outbound connections + (e.g. database access). Includes VIPs from tenants that site can be hosted with current + settings. Read-only. + :vartype outbound_ip_addresses: str + :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. + :vartype possible_outbound_ip_addresses: str + :param container_size: Size of the function container. + :type container_size: int + :param daily_memory_time_quota: Maximum allowed daily memory-time quota (applicable on dynamic + apps only). + :type daily_memory_time_quota: int + :ivar suspended_till: App suspended till in case memory-time quota is exceeded. + :vartype suspended_till: ~datetime.datetime + :ivar max_number_of_workers: Maximum number of workers. + This only applies to Functions container. + :vartype max_number_of_workers: int + :param cloning_info: If specified during app creation, the app is cloned from a source app. + :type cloning_info: ~azure.mgmt.web.v2020_12_01.models.CloningInfo + :ivar resource_group: Name of the resource group the app belongs to. Read-only. + :vartype resource_group: str + :ivar is_default_container: :code:`true` if the app is a default container; + otherwise, :code:`false`. + :vartype is_default_container: bool + :ivar default_host_name: Default hostname of the app. Read-only. + :vartype default_host_name: str + :ivar slot_swap_status: Status of the last deployment slot swap operation. + :vartype slot_swap_status: ~azure.mgmt.web.v2020_12_01.models.SlotSwapStatus + :param key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :type key_vault_reference_identity: str + :param https_only: HttpsOnly: configures a web site to accept only https requests. Issues + redirect for + http requests. + :type https_only: bool + :param redundancy_mode: Site redundancy mode. Possible values include: "None", "Manual", + "Failover", "ActiveActive", "GeoRedundant". + :type redundancy_mode: str or ~azure.mgmt.web.v2020_12_01.models.RedundancyMode + :ivar in_progress_operation_id: Specifies an operation id if this site has a pending operation. + :vartype in_progress_operation_id: str + :param storage_account_required: Checks if Customer provided storage account is required. + :type storage_account_required: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'host_names': {'readonly': True}, + 'repository_site_name': {'readonly': True}, + 'usage_state': {'readonly': True}, + 'enabled_host_names': {'readonly': True}, + 'availability_state': {'readonly': True}, + 'last_modified_time_utc': {'readonly': True}, + 'traffic_manager_host_names': {'readonly': True}, + 'target_swap_slot': {'readonly': True}, + 'outbound_ip_addresses': {'readonly': True}, + 'possible_outbound_ip_addresses': {'readonly': True}, + 'suspended_till': {'readonly': True}, + 'max_number_of_workers': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'is_default_container': {'readonly': True}, + 'default_host_name': {'readonly': True}, + 'slot_swap_status': {'readonly': True}, + 'in_progress_operation_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + 'repository_site_name': {'key': 'properties.repositorySiteName', 'type': 'str'}, + 'usage_state': {'key': 'properties.usageState', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'str'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, + 'last_modified_time_utc': {'key': 'properties.lastModifiedTimeUtc', 'type': 'iso-8601'}, + 'site_config': {'key': 'properties.siteConfig', 'type': 'SiteConfig'}, + 'traffic_manager_host_names': {'key': 'properties.trafficManagerHostNames', 'type': '[str]'}, + 'scm_site_also_stopped': {'key': 'properties.scmSiteAlsoStopped', 'type': 'bool'}, + 'target_swap_slot': {'key': 'properties.targetSwapSlot', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'client_affinity_enabled': {'key': 'properties.clientAffinityEnabled', 'type': 'bool'}, + 'client_cert_enabled': {'key': 'properties.clientCertEnabled', 'type': 'bool'}, + 'client_cert_mode': {'key': 'properties.clientCertMode', 'type': 'str'}, + 'client_cert_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + 'custom_domain_verification_id': {'key': 'properties.customDomainVerificationId', 'type': 'str'}, + 'outbound_ip_addresses': {'key': 'properties.outboundIpAddresses', 'type': 'str'}, + 'possible_outbound_ip_addresses': {'key': 'properties.possibleOutboundIpAddresses', 'type': 'str'}, + 'container_size': {'key': 'properties.containerSize', 'type': 'int'}, + 'daily_memory_time_quota': {'key': 'properties.dailyMemoryTimeQuota', 'type': 'int'}, + 'suspended_till': {'key': 'properties.suspendedTill', 'type': 'iso-8601'}, + 'max_number_of_workers': {'key': 'properties.maxNumberOfWorkers', 'type': 'int'}, + 'cloning_info': {'key': 'properties.cloningInfo', 'type': 'CloningInfo'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'is_default_container': {'key': 'properties.isDefaultContainer', 'type': 'bool'}, + 'default_host_name': {'key': 'properties.defaultHostName', 'type': 'str'}, + 'slot_swap_status': {'key': 'properties.slotSwapStatus', 'type': 'SlotSwapStatus'}, + 'key_vault_reference_identity': {'key': 'properties.keyVaultReferenceIdentity', 'type': 'str'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'str'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(SitePatchResource, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.state = None + self.host_names = None + self.repository_site_name = None + self.usage_state = None + self.enabled = kwargs.get('enabled', None) + self.enabled_host_names = None + self.availability_state = None + self.host_name_ssl_states = kwargs.get('host_name_ssl_states', None) + self.server_farm_id = kwargs.get('server_farm_id', None) + self.reserved = kwargs.get('reserved', False) + self.is_xenon = kwargs.get('is_xenon', False) + self.hyper_v = kwargs.get('hyper_v', False) + self.last_modified_time_utc = None + self.site_config = kwargs.get('site_config', None) + self.traffic_manager_host_names = None + self.scm_site_also_stopped = kwargs.get('scm_site_also_stopped', False) + self.target_swap_slot = None + self.hosting_environment_profile = kwargs.get('hosting_environment_profile', None) + self.client_affinity_enabled = kwargs.get('client_affinity_enabled', None) + self.client_cert_enabled = kwargs.get('client_cert_enabled', None) + self.client_cert_mode = kwargs.get('client_cert_mode', None) + self.client_cert_exclusion_paths = kwargs.get('client_cert_exclusion_paths', None) + self.host_names_disabled = kwargs.get('host_names_disabled', None) + self.custom_domain_verification_id = kwargs.get('custom_domain_verification_id', None) + self.outbound_ip_addresses = None + self.possible_outbound_ip_addresses = None + self.container_size = kwargs.get('container_size', None) + self.daily_memory_time_quota = kwargs.get('daily_memory_time_quota', None) + self.suspended_till = None + self.max_number_of_workers = None + self.cloning_info = kwargs.get('cloning_info', None) + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.key_vault_reference_identity = kwargs.get('key_vault_reference_identity', None) + self.https_only = kwargs.get('https_only', None) + self.redundancy_mode = kwargs.get('redundancy_mode', None) + self.in_progress_operation_id = None + self.storage_account_required = kwargs.get('storage_account_required', None) + + +class SitePhpErrorLogFlag(ProxyOnlyResource): + """Used for getting PHP error logging flag. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param local_log_errors: Local log_errors setting. + :type local_log_errors: str + :param master_log_errors: Master log_errors setting. + :type master_log_errors: str + :param local_log_errors_max_length: Local log_errors_max_len setting. + :type local_log_errors_max_length: str + :param master_log_errors_max_length: Master log_errors_max_len setting. + :type master_log_errors_max_length: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'local_log_errors': {'key': 'properties.localLogErrors', 'type': 'str'}, + 'master_log_errors': {'key': 'properties.masterLogErrors', 'type': 'str'}, + 'local_log_errors_max_length': {'key': 'properties.localLogErrorsMaxLength', 'type': 'str'}, + 'master_log_errors_max_length': {'key': 'properties.masterLogErrorsMaxLength', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SitePhpErrorLogFlag, self).__init__(**kwargs) + self.local_log_errors = kwargs.get('local_log_errors', None) + self.master_log_errors = kwargs.get('master_log_errors', None) + self.local_log_errors_max_length = kwargs.get('local_log_errors_max_length', None) + self.master_log_errors_max_length = kwargs.get('master_log_errors_max_length', None) + + +class SiteSeal(msrest.serialization.Model): + """Site seal. + + All required parameters must be populated in order to send to Azure. + + :param html: Required. HTML snippet. + :type html: str + """ + + _validation = { + 'html': {'required': True}, + } + + _attribute_map = { + 'html': {'key': 'html', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteSeal, self).__init__(**kwargs) + self.html = kwargs['html'] + + +class SiteSealRequest(msrest.serialization.Model): + """Site seal request. + + :param light_theme: If :code:`true` use the light color theme for site seal; + otherwise, use the default color theme. + :type light_theme: bool + :param locale: Locale of site seal. + :type locale: str + """ + + _attribute_map = { + 'light_theme': {'key': 'lightTheme', 'type': 'bool'}, + 'locale': {'key': 'locale', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteSealRequest, self).__init__(**kwargs) + self.light_theme = kwargs.get('light_theme', None) + self.locale = kwargs.get('locale', None) + + +class SiteSourceControl(ProxyOnlyResource): + """Source control configuration for an app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param repo_url: Repository or source control URL. + :type repo_url: str + :param branch: Name of branch to use for deployment. + :type branch: str + :param is_manual_integration: :code:`true` to limit to manual integration; + :code:`false` to enable continuous integration (which configures webhooks into + online repos like GitHub). + :type is_manual_integration: bool + :param is_git_hub_action: :code:`true` if this is deployed via GitHub action. + :type is_git_hub_action: bool + :param deployment_rollback_enabled: :code:`true` to enable deployment rollback; + otherwise, :code:`false`. + :type deployment_rollback_enabled: bool + :param is_mercurial: :code:`true` for a Mercurial repository; + :code:`false` for a Git repository. + :type is_mercurial: bool + :param git_hub_action_configuration: If GitHub Action is selected, than the associated + configuration. + :type git_hub_action_configuration: + ~azure.mgmt.web.v2020_12_01.models.GitHubActionConfiguration + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, + 'is_git_hub_action': {'key': 'properties.isGitHubAction', 'type': 'bool'}, + 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, + 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, + 'git_hub_action_configuration': {'key': 'properties.gitHubActionConfiguration', 'type': 'GitHubActionConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteSourceControl, self).__init__(**kwargs) + self.repo_url = kwargs.get('repo_url', None) + self.branch = kwargs.get('branch', None) + self.is_manual_integration = kwargs.get('is_manual_integration', None) + self.is_git_hub_action = kwargs.get('is_git_hub_action', None) + self.deployment_rollback_enabled = kwargs.get('deployment_rollback_enabled', None) + self.is_mercurial = kwargs.get('is_mercurial', None) + self.git_hub_action_configuration = kwargs.get('git_hub_action_configuration', None) + + +class SkuCapacity(msrest.serialization.Model): + """Description of the App Service plan scale options. + + :param minimum: Minimum number of workers for this App Service plan SKU. + :type minimum: int + :param maximum: Maximum number of workers for this App Service plan SKU. + :type maximum: int + :param elastic_maximum: Maximum number of Elastic workers for this App Service plan SKU. + :type elastic_maximum: int + :param default: Default number of workers for this App Service plan SKU. + :type default: int + :param scale_type: Available scale configurations for an App Service plan. + :type scale_type: str + """ + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'elastic_maximum': {'key': 'elasticMaximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = kwargs.get('minimum', None) + self.maximum = kwargs.get('maximum', None) + self.elastic_maximum = kwargs.get('elastic_maximum', None) + self.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuDescription(msrest.serialization.Model): + """Description of a SKU for a scalable resource. + + :param name: Name of the resource SKU. + :type name: str + :param tier: Service tier of the resource SKU. + :type tier: str + :param size: Size specifier of the resource SKU. + :type size: str + :param family: Family code of the resource SKU. + :type family: str + :param capacity: Current number of instances assigned to the resource. + :type capacity: int + :param sku_capacity: Min, max, and default scale values of the SKU. + :type sku_capacity: ~azure.mgmt.web.v2020_12_01.models.SkuCapacity + :param locations: Locations of the SKU. + :type locations: list[str] + :param capabilities: Capabilities of the SKU, e.g., is traffic manager enabled?. + :type capabilities: list[~azure.mgmt.web.v2020_12_01.models.Capability] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'sku_capacity': {'key': 'skuCapacity', 'type': 'SkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + self.sku_capacity = kwargs.get('sku_capacity', None) + self.locations = kwargs.get('locations', None) + self.capabilities = kwargs.get('capabilities', None) + + +class SkuInfo(msrest.serialization.Model): + """SKU discovery information. + + :param resource_type: Resource type that this SKU applies to. + :type resource_type: str + :param sku: Name and tier of the SKU. + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2020_12_01.models.SkuCapacity + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuInfo, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.sku = kwargs.get('sku', None) + self.capacity = kwargs.get('capacity', None) + + +class SkuInfoCollection(msrest.serialization.Model): + """Collection of SKU information. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SkuInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SkuInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuInfoCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class SkuInfos(msrest.serialization.Model): + """Collection of SKU information. + + :param resource_type: Resource type that this SKU applies to. + :type resource_type: str + :param skus: List of SKUs the subscription is able to use. + :type skus: list[~azure.mgmt.web.v2020_12_01.models.GlobalCsmSkuDescription] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuInfos, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.skus = kwargs.get('skus', None) + + +class SlotConfigNamesResource(ProxyOnlyResource): + """Slot Config names azure resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param connection_string_names: List of connection string names. + :type connection_string_names: list[str] + :param app_setting_names: List of application settings names. + :type app_setting_names: list[str] + :param azure_storage_config_names: List of external Azure storage account identifiers. + :type azure_storage_config_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string_names': {'key': 'properties.connectionStringNames', 'type': '[str]'}, + 'app_setting_names': {'key': 'properties.appSettingNames', 'type': '[str]'}, + 'azure_storage_config_names': {'key': 'properties.azureStorageConfigNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(SlotConfigNamesResource, self).__init__(**kwargs) + self.connection_string_names = kwargs.get('connection_string_names', None) + self.app_setting_names = kwargs.get('app_setting_names', None) + self.azure_storage_config_names = kwargs.get('azure_storage_config_names', None) + + +class SlotDifference(ProxyOnlyResource): + """A setting difference between two deployment slots of an app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar level: Level of the difference: Information, Warning or Error. + :vartype level: str + :ivar setting_type: The type of the setting: General, AppSetting or ConnectionString. + :vartype setting_type: str + :ivar diff_rule: Rule that describes how to process the setting difference during a slot swap. + :vartype diff_rule: str + :ivar setting_name: Name of the setting. + :vartype setting_name: str + :ivar value_in_current_slot: Value of the setting in the current slot. + :vartype value_in_current_slot: str + :ivar value_in_target_slot: Value of the setting in the target slot. + :vartype value_in_target_slot: str + :ivar description: Description of the setting difference. + :vartype description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'level': {'readonly': True}, + 'setting_type': {'readonly': True}, + 'diff_rule': {'readonly': True}, + 'setting_name': {'readonly': True}, + 'value_in_current_slot': {'readonly': True}, + 'value_in_target_slot': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'level': {'key': 'properties.level', 'type': 'str'}, + 'setting_type': {'key': 'properties.settingType', 'type': 'str'}, + 'diff_rule': {'key': 'properties.diffRule', 'type': 'str'}, + 'setting_name': {'key': 'properties.settingName', 'type': 'str'}, + 'value_in_current_slot': {'key': 'properties.valueInCurrentSlot', 'type': 'str'}, + 'value_in_target_slot': {'key': 'properties.valueInTargetSlot', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SlotDifference, self).__init__(**kwargs) + self.level = None + self.setting_type = None + self.diff_rule = None + self.setting_name = None + self.value_in_current_slot = None + self.value_in_target_slot = None + self.description = None + + +class SlotDifferenceCollection(msrest.serialization.Model): + """Collection of slot differences. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SlotDifference] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SlotDifference]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SlotDifferenceCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class SlotSwapStatus(msrest.serialization.Model): + """The status of the last successful slot swap operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar timestamp_utc: The time the last successful slot swap completed. + :vartype timestamp_utc: ~datetime.datetime + :ivar source_slot_name: The source slot of the last swap operation. + :vartype source_slot_name: str + :ivar destination_slot_name: The destination slot of the last swap operation. + :vartype destination_slot_name: str + """ + + _validation = { + 'timestamp_utc': {'readonly': True}, + 'source_slot_name': {'readonly': True}, + 'destination_slot_name': {'readonly': True}, + } + + _attribute_map = { + 'timestamp_utc': {'key': 'timestampUtc', 'type': 'iso-8601'}, + 'source_slot_name': {'key': 'sourceSlotName', 'type': 'str'}, + 'destination_slot_name': {'key': 'destinationSlotName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(msrest.serialization.Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: str + :param path: Request Path. + :type path: str + :param count: Request Count. + :type count: int + :param time_interval: Time interval. + :type time_interval: str + """ + + _attribute_map = { + 'time_taken': {'key': 'timeTaken', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = kwargs.get('time_taken', None) + self.path = kwargs.get('path', None) + self.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', None) + + +class Snapshot(ProxyOnlyResource): + """A snapshot of an app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar time: The time the snapshot was taken. + :vartype time: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time': {'key': 'properties.time', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Snapshot, self).__init__(**kwargs) + self.time = None + + +class SnapshotCollection(msrest.serialization.Model): + """Collection of snapshots which can be used to revert an app to a previous time. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Snapshot] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Snapshot]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SnapshotCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class SnapshotRecoverySource(msrest.serialization.Model): + """Specifies the web app that snapshot contents will be retrieved from. + + :param location: Geographical location of the source web app, e.g. SouthEastAsia, + SouthCentralUS. + :type location: str + :param id: ARM resource ID of the source app. + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + for production slots and + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + for other slots. + :type id: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SnapshotRecoverySource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.id = kwargs.get('id', None) + + +class SnapshotRestoreRequest(ProxyOnlyResource): + """Details about app recovery operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app restore should be done, formatted as a + DateTime string. + :type snapshot_time: str + :param recovery_source: Optional. Specifies the web app that snapshot contents will be + retrieved from. + If empty, the targeted web app will be used as the source. + :type recovery_source: ~azure.mgmt.web.v2020_12_01.models.SnapshotRecoverySource + :param overwrite: If :code:`true` the restore operation can overwrite source app; + otherwise, :code:`false`. + :type overwrite: bool + :param recover_configuration: If true, site configuration, in addition to content, will be + reverted. + :type recover_configuration: bool + :param ignore_conflicting_host_names: If true, custom hostname conflicts will be ignored when + recovering to a target web app. + This setting is only necessary when RecoverConfiguration is enabled. + :type ignore_conflicting_host_names: bool + :param use_dr_secondary: If true, the snapshot is retrieved from DRSecondary endpoint. + :type use_dr_secondary: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, + 'recovery_source': {'key': 'properties.recoverySource', 'type': 'SnapshotRecoverySource'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + 'use_dr_secondary': {'key': 'properties.useDRSecondary', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(SnapshotRestoreRequest, self).__init__(**kwargs) + self.snapshot_time = kwargs.get('snapshot_time', None) + self.recovery_source = kwargs.get('recovery_source', None) + self.overwrite = kwargs.get('overwrite', None) + self.recover_configuration = kwargs.get('recover_configuration', None) + self.ignore_conflicting_host_names = kwargs.get('ignore_conflicting_host_names', None) + self.use_dr_secondary = kwargs.get('use_dr_secondary', None) + + +class Solution(msrest.serialization.Model): + """Class Representing Solution for problems detected. + + :param id: Solution Id. + :type id: float + :param display_name: Display Name of the solution. + :type display_name: str + :param order: Order of the solution. + :type order: float + :param description: Description of the solution. + :type description: str + :param type: Type of Solution. Possible values include: "QuickSolution", "DeepInvestigation", + "BestPractices". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2020_12_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: list[list[~azure.mgmt.web.v2020_12_01.models.NameValuePair]] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'float'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, + } + + def __init__( + self, + **kwargs + ): + super(Solution, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.display_name = kwargs.get('display_name', None) + self.order = kwargs.get('order', None) + self.description = kwargs.get('description', None) + self.type = kwargs.get('type', None) + self.data = kwargs.get('data', None) + self.metadata = kwargs.get('metadata', None) + + +class SourceControl(ProxyOnlyResource): + """The source control OAuth token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param token: OAuth access token. + :type token: str + :param token_secret: OAuth access token secret. + :type token_secret: str + :param refresh_token: OAuth refresh token. + :type refresh_token: str + :param expiration_time: OAuth token expiration. + :type expiration_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'token': {'key': 'properties.token', 'type': 'str'}, + 'token_secret': {'key': 'properties.tokenSecret', 'type': 'str'}, + 'refresh_token': {'key': 'properties.refreshToken', 'type': 'str'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SourceControl, self).__init__(**kwargs) + self.token = kwargs.get('token', None) + self.token_secret = kwargs.get('token_secret', None) + self.refresh_token = kwargs.get('refresh_token', None) + self.expiration_time = kwargs.get('expiration_time', None) + + +class SourceControlCollection(msrest.serialization.Model): + """Collection of source controls. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SourceControl] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SourceControl]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SourceControlCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class StackMajorVersion(msrest.serialization.Model): + """Application stack major version. + + :param display_version: Application stack major version (display only). + :type display_version: str + :param runtime_version: Application stack major version (runtime only). + :type runtime_version: str + :param is_default: :code:`true` if this is the default major version; otherwise, + :code:`false`. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: list[~azure.mgmt.web.v2020_12_01.models.StackMinorVersion] + :param application_insights: :code:`true` if this supports Application Insights; + otherwise, :code:`false`. + :type application_insights: bool + :param app_settings_dictionary: :code:` + + ` + Example: All the function apps need AppSetting: "FUNCTIONS_WORKER_RUNTIME" to be set stack + name. + :type app_settings_dictionary: dict[str, object] + :param site_config_properties_dictionary: :code:` + + ` + Example: All Linux Function Apps, need Use32BitWorkerProcess to be set to 0. + :type site_config_properties_dictionary: dict[str, object] + :param is_preview: :code:`true` if this stack is in Preview, otherwise + :code:`false`. + :type is_preview: bool + :param is_deprecated: :code:`true` if this stack has been deprecated, otherwise + :code:`false`. + :type is_deprecated: bool + :param is_hidden: :code:`true` if this stack should be hidden for new customers on + portal, otherwise :code:`false`. + :type is_hidden: bool + """ + + _attribute_map = { + 'display_version': {'key': 'displayVersion', 'type': 'str'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'minor_versions': {'key': 'minorVersions', 'type': '[StackMinorVersion]'}, + 'application_insights': {'key': 'applicationInsights', 'type': 'bool'}, + 'app_settings_dictionary': {'key': 'appSettingsDictionary', 'type': '{object}'}, + 'site_config_properties_dictionary': {'key': 'siteConfigPropertiesDictionary', 'type': '{object}'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(StackMajorVersion, self).__init__(**kwargs) + self.display_version = kwargs.get('display_version', None) + self.runtime_version = kwargs.get('runtime_version', None) + self.is_default = kwargs.get('is_default', None) + self.minor_versions = kwargs.get('minor_versions', None) + self.application_insights = kwargs.get('application_insights', None) + self.app_settings_dictionary = kwargs.get('app_settings_dictionary', None) + self.site_config_properties_dictionary = kwargs.get('site_config_properties_dictionary', None) + self.is_preview = kwargs.get('is_preview', None) + self.is_deprecated = kwargs.get('is_deprecated', None) + self.is_hidden = kwargs.get('is_hidden', None) + + +class StackMinorVersion(msrest.serialization.Model): + """Application stack minor version. + + :param display_version: Application stack minor version (display only). + :type display_version: str + :param runtime_version: Application stack minor version (runtime only). + :type runtime_version: str + :param is_default: :code:`true` if this is the default minor version; otherwise, + :code:`false`. + :type is_default: bool + :param is_remote_debugging_enabled: :code:`true` if this supports Remote + Debugging, otherwise :code:`false`. + :type is_remote_debugging_enabled: bool + """ + + _attribute_map = { + 'display_version': {'key': 'displayVersion', 'type': 'str'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_remote_debugging_enabled': {'key': 'isRemoteDebuggingEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(StackMinorVersion, self).__init__(**kwargs) + self.display_version = kwargs.get('display_version', None) + self.runtime_version = kwargs.get('runtime_version', None) + self.is_default = kwargs.get('is_default', None) + self.is_remote_debugging_enabled = kwargs.get('is_remote_debugging_enabled', None) + + +class StampCapacity(msrest.serialization.Model): + """Stamp capacity information. + + :param name: Name of the stamp. + :type name: str + :param available_capacity: Available capacity (# of machines, bytes of storage etc...). + :type available_capacity: long + :param total_capacity: Total capacity (# of machines, bytes of storage etc...). + :type total_capacity: long + :param unit: Name of the unit. + :type unit: str + :param compute_mode: Shared/dedicated workers. Possible values include: "Shared", "Dedicated", + "Dynamic". + :type compute_mode: str or ~azure.mgmt.web.v2020_12_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: "Small", "Medium", "Large", + "D1", "D2", "D3", "SmallV3", "MediumV3", "LargeV3", "NestedSmall", "NestedSmallLinux", + "Default". + :type worker_size: str or ~azure.mgmt.web.v2020_12_01.models.WorkerSizeOptions + :param worker_size_id: Size ID of machines: + 0 - Small + 1 - Medium + 2 - Large. + :type worker_size_id: int + :param exclude_from_capacity_allocation: If :code:`true`, it includes basic apps. + Basic apps are not used for capacity allocation. + :type exclude_from_capacity_allocation: bool + :param is_applicable_for_all_compute_modes: :code:`true` if capacity is applicable + for all apps; otherwise, :code:`false`. + :type is_applicable_for_all_compute_modes: bool + :param site_mode: Shared or Dedicated. + :type site_mode: str + :param is_linux: Is this a linux stamp capacity. + :type is_linux: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available_capacity': {'key': 'availableCapacity', 'type': 'long'}, + 'total_capacity': {'key': 'totalCapacity', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'compute_mode': {'key': 'computeMode', 'type': 'str'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'exclude_from_capacity_allocation': {'key': 'excludeFromCapacityAllocation', 'type': 'bool'}, + 'is_applicable_for_all_compute_modes': {'key': 'isApplicableForAllComputeModes', 'type': 'bool'}, + 'site_mode': {'key': 'siteMode', 'type': 'str'}, + 'is_linux': {'key': 'isLinux', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(StampCapacity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.available_capacity = kwargs.get('available_capacity', None) + self.total_capacity = kwargs.get('total_capacity', None) + self.unit = kwargs.get('unit', None) + self.compute_mode = kwargs.get('compute_mode', None) + self.worker_size = kwargs.get('worker_size', None) + self.worker_size_id = kwargs.get('worker_size_id', None) + self.exclude_from_capacity_allocation = kwargs.get('exclude_from_capacity_allocation', None) + self.is_applicable_for_all_compute_modes = kwargs.get('is_applicable_for_all_compute_modes', None) + self.site_mode = kwargs.get('site_mode', None) + self.is_linux = kwargs.get('is_linux', None) + + +class StampCapacityCollection(msrest.serialization.Model): + """Collection of stamp capacities. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StampCapacity] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StampCapacity]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StampCapacityCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class StaticSiteARMResource(Resource): + """Static Site ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: Description of a SKU for a scalable resource. + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param identity: Managed service identity. + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :ivar default_hostname: The default autogenerated hostname for the static site. + :vartype default_hostname: str + :param repository_url: URL for the repository of the static site. + :type repository_url: str + :param branch: The target branch in the repository. + :type branch: str + :ivar provider: The provider that submitted the last deployment to the primary environment of + the static site. + :vartype provider: str + :ivar custom_domains: The custom domains associated with this static site. + :vartype custom_domains: list[str] + :param repository_token: A user's github repository token. This is used to setup the Github + Actions workflow file and API secrets. + :type repository_token: str + :param build_properties: Build properties to configure on the repository. + :type build_properties: ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildProperties + :param template_properties: Template options for generating a new repository. + :type template_properties: ~azure.mgmt.web.v2020_12_01.models.StaticSiteTemplateOptions + :ivar content_distribution_endpoint: The content distribution endpoint for the static site. + :vartype content_distribution_endpoint: str + :ivar key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :vartype key_vault_reference_identity: str + :ivar user_provided_function_apps: User provided function apps registered with the static site. + :vartype user_provided_function_apps: + list[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionApp] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'provider': {'readonly': True}, + 'custom_domains': {'readonly': True}, + 'content_distribution_endpoint': {'readonly': True}, + 'key_vault_reference_identity': {'readonly': True}, + 'user_provided_function_apps': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + 'template_properties': {'key': 'properties.templateProperties', 'type': 'StaticSiteTemplateOptions'}, + 'content_distribution_endpoint': {'key': 'properties.contentDistributionEndpoint', 'type': 'str'}, + 'key_vault_reference_identity': {'key': 'properties.keyVaultReferenceIdentity', 'type': 'str'}, + 'user_provided_function_apps': {'key': 'properties.userProvidedFunctionApps', 'type': '[StaticSiteUserProvidedFunctionApp]'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteARMResource, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) + self.default_hostname = None + self.repository_url = kwargs.get('repository_url', None) + self.branch = kwargs.get('branch', None) + self.provider = None + self.custom_domains = None + self.repository_token = kwargs.get('repository_token', None) + self.build_properties = kwargs.get('build_properties', None) + self.template_properties = kwargs.get('template_properties', None) + self.content_distribution_endpoint = None + self.key_vault_reference_identity = None + self.user_provided_function_apps = None + + +class StaticSiteBuildARMResource(ProxyOnlyResource): + """Static Site Build ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar build_id: An identifier for the static site build. + :vartype build_id: str + :ivar source_branch: The source branch. + :vartype source_branch: str + :ivar pull_request_title: The title of a pull request that a static site build is related to. + :vartype pull_request_title: str + :ivar hostname: The hostname for a static site build. + :vartype hostname: str + :ivar created_time_utc: When this build was created. + :vartype created_time_utc: ~datetime.datetime + :ivar last_updated_on: When this build was updated. + :vartype last_updated_on: ~datetime.datetime + :ivar status: The status of the static site build. Possible values include: + "WaitingForDeployment", "Uploading", "Deploying", "Ready", "Failed", "Deleting", "Detached". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.BuildStatus + :ivar user_provided_function_apps: User provided function apps registered with the static site + build. + :vartype user_provided_function_apps: + list[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionApp] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'build_id': {'readonly': True}, + 'source_branch': {'readonly': True}, + 'pull_request_title': {'readonly': True}, + 'hostname': {'readonly': True}, + 'created_time_utc': {'readonly': True}, + 'last_updated_on': {'readonly': True}, + 'status': {'readonly': True}, + 'user_provided_function_apps': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'build_id': {'key': 'properties.buildId', 'type': 'str'}, + 'source_branch': {'key': 'properties.sourceBranch', 'type': 'str'}, + 'pull_request_title': {'key': 'properties.pullRequestTitle', 'type': 'str'}, + 'hostname': {'key': 'properties.hostname', 'type': 'str'}, + 'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'properties.lastUpdatedOn', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'user_provided_function_apps': {'key': 'properties.userProvidedFunctionApps', 'type': '[StaticSiteUserProvidedFunctionApp]'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteBuildARMResource, self).__init__(**kwargs) + self.build_id = None + self.source_branch = None + self.pull_request_title = None + self.hostname = None + self.created_time_utc = None + self.last_updated_on = None + self.status = None + self.user_provided_function_apps = None + + +class StaticSiteBuildCollection(msrest.serialization.Model): + """Collection of static site builds. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteBuildARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteBuildCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class StaticSiteBuildProperties(msrest.serialization.Model): + """Build properties for the static site. + + :param app_location: The path to the app code within the repository. + :type app_location: str + :param api_location: The path to the api code within the repository. + :type api_location: str + :param app_artifact_location: Deprecated: The path of the app artifacts after building + (deprecated in favor of OutputLocation). + :type app_artifact_location: str + :param output_location: The output path of the app after building. + :type output_location: str + :param app_build_command: A custom command to run during deployment of the static content + application. + :type app_build_command: str + :param api_build_command: A custom command to run during deployment of the Azure Functions API + application. + :type api_build_command: str + :param skip_github_action_workflow_generation: Skip Github Action workflow generation. + :type skip_github_action_workflow_generation: bool + :param github_action_secret_name_override: Github Action secret name override. + :type github_action_secret_name_override: str + """ + + _attribute_map = { + 'app_location': {'key': 'appLocation', 'type': 'str'}, + 'api_location': {'key': 'apiLocation', 'type': 'str'}, + 'app_artifact_location': {'key': 'appArtifactLocation', 'type': 'str'}, + 'output_location': {'key': 'outputLocation', 'type': 'str'}, + 'app_build_command': {'key': 'appBuildCommand', 'type': 'str'}, + 'api_build_command': {'key': 'apiBuildCommand', 'type': 'str'}, + 'skip_github_action_workflow_generation': {'key': 'skipGithubActionWorkflowGeneration', 'type': 'bool'}, + 'github_action_secret_name_override': {'key': 'githubActionSecretNameOverride', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteBuildProperties, self).__init__(**kwargs) + self.app_location = kwargs.get('app_location', None) + self.api_location = kwargs.get('api_location', None) + self.app_artifact_location = kwargs.get('app_artifact_location', None) + self.output_location = kwargs.get('output_location', None) + self.app_build_command = kwargs.get('app_build_command', None) + self.api_build_command = kwargs.get('api_build_command', None) + self.skip_github_action_workflow_generation = kwargs.get('skip_github_action_workflow_generation', None) + self.github_action_secret_name_override = kwargs.get('github_action_secret_name_override', None) + + +class StaticSiteCollection(msrest.serialization.Model): + """Collection of static sites. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class StaticSiteCustomDomainOverviewARMResource(ProxyOnlyResource): + """Static Site Custom Domain Overview ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar domain_name: The domain name for the static site custom domain. + :vartype domain_name: str + :ivar created_on: The date and time on which the custom domain was created for the static site. + :vartype created_on: ~datetime.datetime + :ivar status: The status of the custom domain. Possible values include: + "RetrievingValidationToken", "Validating", "Adding", "Ready", "Failed", "Deleting". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.CustomDomainStatus + :ivar validation_token: The TXT record validation token. + :vartype validation_token: str + :ivar error_message: + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_name': {'readonly': True}, + 'created_on': {'readonly': True}, + 'status': {'readonly': True}, + 'validation_token': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'validation_token': {'key': 'properties.validationToken', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteCustomDomainOverviewARMResource, self).__init__(**kwargs) + self.domain_name = None + self.created_on = None + self.status = None + self.validation_token = None + self.error_message = None + + +class StaticSiteCustomDomainOverviewCollection(msrest.serialization.Model): + """Collection of static site custom domains. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteCustomDomainOverviewARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteCustomDomainOverviewCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class StaticSiteCustomDomainRequestPropertiesARMResource(ProxyOnlyResource): + """Static Site Custom Domain Request Properties ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param validation_method: Validation method for adding a custom domain. + :type validation_method: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'validation_method': {'key': 'properties.validationMethod', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteCustomDomainRequestPropertiesARMResource, self).__init__(**kwargs) + self.validation_method = kwargs.get('validation_method', "cname-delegation") + + +class StaticSiteFunctionOverviewARMResource(ProxyOnlyResource): + """Static Site Function Overview ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar function_name: The name for the function. + :vartype function_name: str + :ivar trigger_type: The trigger type of the function. Possible values include: "HttpTrigger", + "Unknown". + :vartype trigger_type: str or ~azure.mgmt.web.v2020_12_01.models.TriggerTypes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'function_name': {'readonly': True}, + 'trigger_type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'function_name': {'key': 'properties.functionName', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteFunctionOverviewARMResource, self).__init__(**kwargs) + self.function_name = None + self.trigger_type = None + + +class StaticSiteFunctionOverviewCollection(msrest.serialization.Model): + """Collection of static site functions. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteFunctionOverviewARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteFunctionOverviewCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class StaticSitePatchResource(ProxyOnlyResource): + """ARM resource for a static site when patching. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar default_hostname: The default autogenerated hostname for the static site. + :vartype default_hostname: str + :param repository_url: URL for the repository of the static site. + :type repository_url: str + :param branch: The target branch in the repository. + :type branch: str + :ivar provider: The provider that submitted the last deployment to the primary environment of + the static site. + :vartype provider: str + :ivar custom_domains: The custom domains associated with this static site. + :vartype custom_domains: list[str] + :param repository_token: A user's github repository token. This is used to setup the Github + Actions workflow file and API secrets. + :type repository_token: str + :param build_properties: Build properties to configure on the repository. + :type build_properties: ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildProperties + :param template_properties: Template options for generating a new repository. + :type template_properties: ~azure.mgmt.web.v2020_12_01.models.StaticSiteTemplateOptions + :ivar content_distribution_endpoint: The content distribution endpoint for the static site. + :vartype content_distribution_endpoint: str + :ivar key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :vartype key_vault_reference_identity: str + :ivar user_provided_function_apps: User provided function apps registered with the static site. + :vartype user_provided_function_apps: + list[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionApp] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'provider': {'readonly': True}, + 'custom_domains': {'readonly': True}, + 'content_distribution_endpoint': {'readonly': True}, + 'key_vault_reference_identity': {'readonly': True}, + 'user_provided_function_apps': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + 'template_properties': {'key': 'properties.templateProperties', 'type': 'StaticSiteTemplateOptions'}, + 'content_distribution_endpoint': {'key': 'properties.contentDistributionEndpoint', 'type': 'str'}, + 'key_vault_reference_identity': {'key': 'properties.keyVaultReferenceIdentity', 'type': 'str'}, + 'user_provided_function_apps': {'key': 'properties.userProvidedFunctionApps', 'type': '[StaticSiteUserProvidedFunctionApp]'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSitePatchResource, self).__init__(**kwargs) + self.default_hostname = None + self.repository_url = kwargs.get('repository_url', None) + self.branch = kwargs.get('branch', None) + self.provider = None + self.custom_domains = None + self.repository_token = kwargs.get('repository_token', None) + self.build_properties = kwargs.get('build_properties', None) + self.template_properties = kwargs.get('template_properties', None) + self.content_distribution_endpoint = None + self.key_vault_reference_identity = None + self.user_provided_function_apps = None + + +class StaticSiteResetPropertiesARMResource(ProxyOnlyResource): + """Static Site Reset Properties ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param repository_token: The token which proves admin privileges to the repository. + :type repository_token: str + :param should_update_repository: Determines whether the repository should be updated with the + new properties. + :type should_update_repository: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'should_update_repository': {'key': 'properties.shouldUpdateRepository', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteResetPropertiesARMResource, self).__init__(**kwargs) + self.repository_token = kwargs.get('repository_token', None) + self.should_update_repository = kwargs.get('should_update_repository', None) + + +class StaticSitesWorkflowPreview(ProxyOnlyResource): + """Preview for the Static Site Workflow to be generated. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar path: The path for the workflow file to be generated. + :vartype path: str + :ivar contents: The contents for the workflow file to be generated. + :vartype contents: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'path': {'readonly': True}, + 'contents': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSitesWorkflowPreview, self).__init__(**kwargs) + self.path = None + self.contents = None + + +class StaticSitesWorkflowPreviewRequest(ProxyOnlyResource): + """Request entity for previewing the Static Site workflow. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param repository_url: URL for the repository of the static site. + :type repository_url: str + :param branch: The target branch in the repository. + :type branch: str + :param build_properties: Build properties to configure on the repository. + :type build_properties: ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSitesWorkflowPreviewRequest, self).__init__(**kwargs) + self.repository_url = kwargs.get('repository_url', None) + self.branch = kwargs.get('branch', None) + self.build_properties = kwargs.get('build_properties', None) + + +class StaticSiteTemplateOptions(msrest.serialization.Model): + """Template Options for the static site. + + :param template_repository_url: URL of the template repository. The newly generated repository + will be based on this one. + :type template_repository_url: str + :param owner: Owner of the newly generated repository. + :type owner: str + :param repository_name: Name of the newly generated repository. + :type repository_name: str + :param description: Description of the newly generated repository. + :type description: str + :param is_private: Whether or not the newly generated repository is a private repository. + Defaults to false (i.e. public). + :type is_private: bool + """ + + _attribute_map = { + 'template_repository_url': {'key': 'templateRepositoryUrl', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_private': {'key': 'isPrivate', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteTemplateOptions, self).__init__(**kwargs) + self.template_repository_url = kwargs.get('template_repository_url', None) + self.owner = kwargs.get('owner', None) + self.repository_name = kwargs.get('repository_name', None) + self.description = kwargs.get('description', None) + self.is_private = kwargs.get('is_private', None) + + +class StaticSiteUserARMResource(ProxyOnlyResource): + """Static Site User ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar provider: The identity provider for the static site user. + :vartype provider: str + :ivar user_id: The user id for the static site user. + :vartype user_id: str + :ivar display_name: The display name for the static site user. + :vartype display_name: str + :param roles: The roles for the static site user, in free-form string format. + :type roles: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provider': {'readonly': True}, + 'user_id': {'readonly': True}, + 'display_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteUserARMResource, self).__init__(**kwargs) + self.provider = None + self.user_id = None + self.display_name = None + self.roles = kwargs.get('roles', None) + + +class StaticSiteUserCollection(msrest.serialization.Model): + """Collection of static site custom users. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteUserARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteUserCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class StaticSiteUserInvitationRequestResource(ProxyOnlyResource): + """Static sites user roles invitation resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param domain: The domain name for the static site custom domain. + :type domain: str + :param provider: The identity provider for the static site user. + :type provider: str + :param user_details: The user id for the static site user. + :type user_details: str + :param roles: The roles for the static site user, in free-form string format. + :type roles: str + :param num_hours_to_expiration: The number of hours the sas token stays valid. + :type num_hours_to_expiration: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'domain': {'key': 'properties.domain', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'user_details': {'key': 'properties.userDetails', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': 'str'}, + 'num_hours_to_expiration': {'key': 'properties.numHoursToExpiration', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteUserInvitationRequestResource, self).__init__(**kwargs) + self.domain = kwargs.get('domain', None) + self.provider = kwargs.get('provider', None) + self.user_details = kwargs.get('user_details', None) + self.roles = kwargs.get('roles', None) + self.num_hours_to_expiration = kwargs.get('num_hours_to_expiration', None) + + +class StaticSiteUserInvitationResponseResource(ProxyOnlyResource): + """Static sites user roles invitation link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar expires_on: The expiration time of the invitation. + :vartype expires_on: ~datetime.datetime + :ivar invitation_url: The url for the invitation link. + :vartype invitation_url: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'expires_on': {'readonly': True}, + 'invitation_url': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'expires_on': {'key': 'properties.expiresOn', 'type': 'iso-8601'}, + 'invitation_url': {'key': 'properties.invitationUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteUserInvitationResponseResource, self).__init__(**kwargs) + self.expires_on = None + self.invitation_url = None + + +class StaticSiteUserProvidedFunctionApp(ProxyOnlyResource): + """A static site user provided function. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param function_app_resource_id: The resource id of the function app registered with the static + site. + :type function_app_resource_id: str + :param function_app_region: The region of the function app registered with the static site. + :type function_app_region: str + :ivar created_on: The date and time on which the function app was registered with the static + site. + :vartype created_on: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_on': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'function_app_resource_id': {'key': 'properties.functionAppResourceId', 'type': 'str'}, + 'function_app_region': {'key': 'properties.functionAppRegion', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteUserProvidedFunctionApp, self).__init__(**kwargs) + self.function_app_resource_id = kwargs.get('function_app_resource_id', None) + self.function_app_region = kwargs.get('function_app_region', None) + self.created_on = None + + +class StaticSiteUserProvidedFunctionAppARMResource(ProxyOnlyResource): + """Static Site User Provided Function App ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param function_app_resource_id: The resource id of the function app registered with the static + site. + :type function_app_resource_id: str + :param function_app_region: The region of the function app registered with the static site. + :type function_app_region: str + :ivar created_on: The date and time on which the function app was registered with the static + site. + :vartype created_on: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_on': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'function_app_resource_id': {'key': 'properties.functionAppResourceId', 'type': 'str'}, + 'function_app_region': {'key': 'properties.functionAppRegion', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteUserProvidedFunctionAppARMResource, self).__init__(**kwargs) + self.function_app_resource_id = kwargs.get('function_app_resource_id', None) + self.function_app_region = kwargs.get('function_app_region', None) + self.created_on = None + + +class StaticSiteUserProvidedFunctionAppsCollection(msrest.serialization.Model): + """Collection of static site user provided function apps. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: + list[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteUserProvidedFunctionAppARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteUserProvidedFunctionAppsCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class StaticSiteZipDeploymentARMResource(ProxyOnlyResource): + """Static site zip deployment ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param app_zip_url: URL for the zipped app content. + :type app_zip_url: str + :param api_zip_url: URL for the zipped api content. + :type api_zip_url: str + :param deployment_title: A title to label the deployment. + :type deployment_title: str + :param provider: The provider submitting this deployment. + :type provider: str + :param function_language: The language of the api content, if it exists. + :type function_language: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'app_zip_url': {'key': 'properties.appZipUrl', 'type': 'str'}, + 'api_zip_url': {'key': 'properties.apiZipUrl', 'type': 'str'}, + 'deployment_title': {'key': 'properties.deploymentTitle', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'function_language': {'key': 'properties.functionLanguage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticSiteZipDeploymentARMResource, self).__init__(**kwargs) + self.app_zip_url = kwargs.get('app_zip_url', None) + self.api_zip_url = kwargs.get('api_zip_url', None) + self.deployment_title = kwargs.get('deployment_title', None) + self.provider = kwargs.get('provider', None) + self.function_language = kwargs.get('function_language', None) + + +class Status(msrest.serialization.Model): + """Identify the status of the most severe insight generated by the detector. + + :param message: Descriptive message. + :type message: str + :param status_id: Level of the most severe insight generated by the detector. Possible values + include: "Critical", "Warning", "Info", "Success", "None". + :type status_id: str or ~azure.mgmt.web.v2020_12_01.models.InsightStatus + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'status_id': {'key': 'statusId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Status, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.status_id = kwargs.get('status_id', None) + + +class StatusCodesBasedTrigger(msrest.serialization.Model): + """Trigger based on status code. + + :param status: HTTP status code. + :type status: int + :param sub_status: Request Sub Status. + :type sub_status: int + :param win32_status: Win32 error code. + :type win32_status: int + :param path: Request Path. + :type path: str + :param count: Request Count. + :type count: int + :param time_interval: Time interval. + :type time_interval: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'int'}, + 'sub_status': {'key': 'subStatus', 'type': 'int'}, + 'win32_status': {'key': 'win32Status', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.sub_status = kwargs.get('sub_status', None) + self.win32_status = kwargs.get('win32_status', None) + self.path = kwargs.get('path', None) + self.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', None) + + +class StatusCodesRangeBasedTrigger(msrest.serialization.Model): + """Trigger based on range of status codes. + + :param status_codes: HTTP status code. + :type status_codes: str + :param path: + :type path: str + :param count: Request Count. + :type count: int + :param time_interval: Time interval. + :type time_interval: str + """ + + _attribute_map = { + 'status_codes': {'key': 'statusCodes', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StatusCodesRangeBasedTrigger, self).__init__(**kwargs) + self.status_codes = kwargs.get('status_codes', None) + self.path = kwargs.get('path', None) + self.count = kwargs.get('count', None) + self.time_interval = kwargs.get('time_interval', None) + + +class StorageMigrationOptions(ProxyOnlyResource): + """Options for app content migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: AzureFiles connection string. + :type azurefiles_connection_string: str + :param azurefiles_share: AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: :code:`true`if the app should be switched + over; otherwise, :code:`false`. + :type switch_site_after_migration: bool + :param block_write_access_to_site: :code:`true` if the app should be read only + during copy operation; otherwise, :code:`false`. + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azurefiles_connection_string': {'key': 'properties.azurefilesConnectionString', 'type': 'str'}, + 'azurefiles_share': {'key': 'properties.azurefilesShare', 'type': 'str'}, + 'switch_site_after_migration': {'key': 'properties.switchSiteAfterMigration', 'type': 'bool'}, + 'block_write_access_to_site': {'key': 'properties.blockWriteAccessToSite', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageMigrationOptions, self).__init__(**kwargs) + self.azurefiles_connection_string = kwargs.get('azurefiles_connection_string', None) + self.azurefiles_share = kwargs.get('azurefiles_share', None) + self.switch_site_after_migration = kwargs.get('switch_site_after_migration', False) + self.block_write_access_to_site = kwargs.get('block_write_access_to_site', False) + + +class StorageMigrationResponse(ProxyOnlyResource): + """Response for a migration of app content request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar operation_id: When server starts the migration process, it will return an operation ID + identifying that particular migration operation. + :vartype operation_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'operation_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageMigrationResponse, self).__init__(**kwargs) + self.operation_id = None + + +class StringDictionary(ProxyOnlyResource): + """String dictionary resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param properties: Settings. + :type properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(StringDictionary, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class StringList(ProxyOnlyResource): + """String list resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param properties: List of string resources. + :type properties: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(StringList, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class SupportTopic(msrest.serialization.Model): + """Defines a unique Support Topic. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Support Topic Id. + :vartype id: str + :ivar pes_id: Unique resource Id. + :vartype pes_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'pes_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'pes_id': {'key': 'pesId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SupportTopic, self).__init__(**kwargs) + self.id = None + self.pes_id = None + + +class SwiftVirtualNetwork(ProxyOnlyResource): + """Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param subnet_resource_id: The Virtual Network subnet's resource ID. This is the subnet that + this Web App will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined + first. + :type subnet_resource_id: str + :param swift_supported: A flag that specifies if the scale unit this Web App is on supports + Swift integration. + :type swift_supported: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet_resource_id': {'key': 'properties.subnetResourceId', 'type': 'str'}, + 'swift_supported': {'key': 'properties.swiftSupported', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(SwiftVirtualNetwork, self).__init__(**kwargs) + self.subnet_resource_id = kwargs.get('subnet_resource_id', None) + self.swift_supported = kwargs.get('swift_supported', None) + + +class TldLegalAgreement(msrest.serialization.Model): + """Legal agreement for a top level domain. + + All required parameters must be populated in order to send to Azure. + + :param agreement_key: Required. Unique identifier for the agreement. + :type agreement_key: str + :param title: Required. Agreement title. + :type title: str + :param content: Required. Agreement details. + :type content: str + :param url: URL where a copy of the agreement details is hosted. + :type url: str + """ + + _validation = { + 'agreement_key': {'required': True}, + 'title': {'required': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'agreement_key': {'key': 'agreementKey', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TldLegalAgreement, self).__init__(**kwargs) + self.agreement_key = kwargs['agreement_key'] + self.title = kwargs['title'] + self.content = kwargs['content'] + self.url = kwargs.get('url', None) + + +class TldLegalAgreementCollection(msrest.serialization.Model): + """Collection of top-level domain legal agreements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.TldLegalAgreement] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TldLegalAgreement]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TldLegalAgreementCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class TokenStore(ProxyOnlyResource): + """TokenStore. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param token_refresh_extension_hours: + :type token_refresh_extension_hours: float + :param file_system: + :type file_system: ~azure.mgmt.web.v2020_12_01.models.FileSystemTokenStore + :param azure_blob_storage: + :type azure_blob_storage: ~azure.mgmt.web.v2020_12_01.models.BlobStorageTokenStore + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'token_refresh_extension_hours': {'key': 'properties.tokenRefreshExtensionHours', 'type': 'float'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'FileSystemTokenStore'}, + 'azure_blob_storage': {'key': 'properties.azureBlobStorage', 'type': 'BlobStorageTokenStore'}, + } + + def __init__( + self, + **kwargs + ): + super(TokenStore, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.token_refresh_extension_hours = kwargs.get('token_refresh_extension_hours', None) + self.file_system = kwargs.get('file_system', None) + self.azure_blob_storage = kwargs.get('azure_blob_storage', None) + + +class TopLevelDomain(ProxyOnlyResource): + """A top level domain object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param privacy: If :code:`true`, then the top level domain supports domain + privacy; otherwise, :code:`false`. + :type privacy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(TopLevelDomain, self).__init__(**kwargs) + self.privacy = kwargs.get('privacy', None) + + +class TopLevelDomainAgreementOption(msrest.serialization.Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If :code:`true`, then the list of agreements will include + agreements for domain privacy as well; otherwise, :code:`false`. + :type include_privacy: bool + :param for_transfer: If :code:`true`, then the list of agreements will include + agreements for domain transfer as well; otherwise, :code:`false`. + :type for_transfer: bool + """ + + _attribute_map = { + 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, + 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(TopLevelDomainAgreementOption, self).__init__(**kwargs) + self.include_privacy = kwargs.get('include_privacy', None) + self.for_transfer = kwargs.get('for_transfer', None) + + +class TopLevelDomainCollection(msrest.serialization.Model): + """Collection of Top-level domains. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.TopLevelDomain] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TopLevelDomain]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TopLevelDomainCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class TriggeredJobHistory(ProxyOnlyResource): + """Triggered Web Job History. List of Triggered Web Job Run Information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param runs: List of triggered web job runs. + :type runs: list[~azure.mgmt.web.v2020_12_01.models.TriggeredJobRun] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'runs': {'key': 'properties.runs', 'type': '[TriggeredJobRun]'}, + } + + def __init__( + self, + **kwargs + ): + super(TriggeredJobHistory, self).__init__(**kwargs) + self.runs = kwargs.get('runs', None) + + +class TriggeredJobHistoryCollection(msrest.serialization.Model): + """Collection of Kudu continuous web job information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TriggeredJobHistory]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TriggeredJobHistoryCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class TriggeredJobRun(ProxyOnlyResource): + """Triggered Web Job Run Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param web_job_id: Job ID. + :type web_job_id: str + :param web_job_name: Job name. + :type web_job_name: str + :param status: Job status. Possible values include: "Success", "Failed", "Error". + :type status: str or ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: ~datetime.datetime + :param end_time: End time. + :type end_time: ~datetime.datetime + :param duration: Job duration. + :type duration: str + :param output_url: Output URL. + :type output_url: str + :param error_url: Error URL. + :type error_url: str + :param url: Job URL. + :type url: str + :param job_name: Job name. + :type job_name: str + :param trigger: Job trigger. + :type trigger: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'web_job_id': {'key': 'properties.web_job_id', 'type': 'str'}, + 'web_job_name': {'key': 'properties.web_job_name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.end_time', 'type': 'iso-8601'}, + 'duration': {'key': 'properties.duration', 'type': 'str'}, + 'output_url': {'key': 'properties.output_url', 'type': 'str'}, + 'error_url': {'key': 'properties.error_url', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'job_name': {'key': 'properties.job_name', 'type': 'str'}, + 'trigger': {'key': 'properties.trigger', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TriggeredJobRun, self).__init__(**kwargs) + self.web_job_id = kwargs.get('web_job_id', None) + self.web_job_name = kwargs.get('web_job_name', None) + self.status = kwargs.get('status', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.duration = kwargs.get('duration', None) + self.output_url = kwargs.get('output_url', None) + self.error_url = kwargs.get('error_url', None) + self.url = kwargs.get('url', None) + self.job_name = kwargs.get('job_name', None) + self.trigger = kwargs.get('trigger', None) + + +class TriggeredWebJob(ProxyOnlyResource): + """Triggered Web Job Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param latest_run: Latest job run information. + :type latest_run: ~azure.mgmt.web.v2020_12_01.models.TriggeredJobRun + :param history_url: History URL. + :type history_url: str + :param scheduler_logs_url: Scheduler Logs URL. + :type scheduler_logs_url: str + :param run_command: Run command. + :type run_command: str + :param url: Job URL. + :type url: str + :param extra_info_url: Extra Info URL. + :type extra_info_url: str + :param web_job_type: Job type. Possible values include: "Continuous", "Triggered". + :type web_job_type: str or ~azure.mgmt.web.v2020_12_01.models.WebJobType + :param error: Error information. + :type error: str + :param using_sdk: Using SDK?. + :type using_sdk: bool + :param settings: Job settings. + :type settings: dict[str, object] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'latest_run': {'key': 'properties.latest_run', 'type': 'TriggeredJobRun'}, + 'history_url': {'key': 'properties.history_url', 'type': 'str'}, + 'scheduler_logs_url': {'key': 'properties.scheduler_logs_url', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + super(TriggeredWebJob, self).__init__(**kwargs) + self.latest_run = kwargs.get('latest_run', None) + self.history_url = kwargs.get('history_url', None) + self.scheduler_logs_url = kwargs.get('scheduler_logs_url', None) + self.run_command = kwargs.get('run_command', None) + self.url = kwargs.get('url', None) + self.extra_info_url = kwargs.get('extra_info_url', None) + self.web_job_type = kwargs.get('web_job_type', None) + self.error = kwargs.get('error', None) + self.using_sdk = kwargs.get('using_sdk', None) + self.settings = kwargs.get('settings', None) + + +class TriggeredWebJobCollection(msrest.serialization.Model): + """Collection of Kudu continuous web job information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TriggeredWebJob]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TriggeredWebJobCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class Twitter(ProxyOnlyResource): + """Twitter. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.TwitterRegistration + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'TwitterRegistration'}, + } + + def __init__( + self, + **kwargs + ): + super(Twitter, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.registration = kwargs.get('registration', None) + + +class TwitterRegistration(ProxyOnlyResource): + """TwitterRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param consumer_key: + :type consumer_key: str + :param consumer_secret_setting_name: + :type consumer_secret_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'consumer_key': {'key': 'properties.consumerKey', 'type': 'str'}, + 'consumer_secret_setting_name': {'key': 'properties.consumerSecretSettingName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TwitterRegistration, self).__init__(**kwargs) + self.consumer_key = kwargs.get('consumer_key', None) + self.consumer_secret_setting_name = kwargs.get('consumer_secret_setting_name', None) + + +class Usage(ProxyOnlyResource): + """Usage of the quota resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: Friendly name shown in the UI. + :vartype display_name: str + :ivar resource_name: Name of the quota resource. + :vartype resource_name: str + :ivar unit: Units of measurement for the quota resource. + :vartype unit: str + :ivar current_value: The current value of the resource counter. + :vartype current_value: long + :ivar limit: The resource limit. + :vartype limit: long + :ivar next_reset_time: Next reset time for the resource counter. + :vartype next_reset_time: ~datetime.datetime + :ivar compute_mode: Compute mode used for this usage. Possible values include: "Shared", + "Dedicated", "Dynamic". + :vartype compute_mode: str or ~azure.mgmt.web.v2020_12_01.models.ComputeModeOptions + :ivar site_mode: Site mode used for this usage. + :vartype site_mode: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + 'compute_mode': {'readonly': True}, + 'site_mode': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'long'}, + 'limit': {'key': 'properties.limit', 'type': 'long'}, + 'next_reset_time': {'key': 'properties.nextResetTime', 'type': 'iso-8601'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'str'}, + 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Usage, self).__init__(**kwargs) + self.display_name = None + self.resource_name = None + self.unit = None + self.current_value = None + self.limit = None + self.next_reset_time = None + self.compute_mode = None + self.site_mode = None + + +class UsageCollection(msrest.serialization.Model): + """Collection of usages. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Usage] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UsageCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class User(ProxyOnlyResource): + """User credentials used for publishing activity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Username used for publishing. + :type publishing_user_name: str + :param publishing_password: Password used for publishing. + :type publishing_password: str + :param publishing_password_hash: Password hash used for publishing. + :type publishing_password_hash: str + :param publishing_password_hash_salt: Password hash salt used for publishing. + :type publishing_password_hash_salt: str + :param scm_uri: Url of SCM site. + :type scm_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publishing_user_name': {'key': 'properties.publishingUserName', 'type': 'str'}, + 'publishing_password': {'key': 'properties.publishingPassword', 'type': 'str'}, + 'publishing_password_hash': {'key': 'properties.publishingPasswordHash', 'type': 'str'}, + 'publishing_password_hash_salt': {'key': 'properties.publishingPasswordHashSalt', 'type': 'str'}, + 'scm_uri': {'key': 'properties.scmUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(User, self).__init__(**kwargs) + self.publishing_user_name = kwargs.get('publishing_user_name', None) + self.publishing_password = kwargs.get('publishing_password', None) + self.publishing_password_hash = kwargs.get('publishing_password_hash', None) + self.publishing_password_hash_salt = kwargs.get('publishing_password_hash_salt', None) + self.scm_uri = kwargs.get('scm_uri', None) + + +class ValidateRequest(msrest.serialization.Model): + """Resource validation request content. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Resource name to verify. + :type name: str + :param type: Required. Resource type used for verification. Possible values include: + "ServerFarm", "Site", "Microsoft.Web/hostingEnvironments". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.ValidateResourceTypes + :param location: Required. Expected location of the resource. + :type location: str + :param server_farm_id: ARM resource ID of an App Service plan that would host the app. + :type server_farm_id: str + :param sku_name: Name of the target SKU for the App Service plan. + :type sku_name: str + :param need_linux_workers: :code:`true` if App Service plan is for Linux workers; + otherwise, :code:`false`. + :type need_linux_workers: bool + :param is_spot: :code:`true` if App Service plan is for Spot instances; otherwise, + :code:`false`. + :type is_spot: bool + :param capacity: Target capacity of the App Service plan (number of VMs). + :type capacity: int + :param hosting_environment: Name of App Service Environment where app or App Service plan + should be created. + :type hosting_environment: str + :param is_xenon: :code:`true` if App Service plan is running as a windows + container. + :type is_xenon: bool + :param container_registry_base_url: Base URL of the container registry. + :type container_registry_base_url: str + :param container_registry_username: Username for to access the container registry. + :type container_registry_username: str + :param container_registry_password: Password for to access the container registry. + :type container_registry_password: str + :param container_image_repository: Repository name (image name). + :type container_image_repository: str + :param container_image_tag: Image tag. + :type container_image_tag: str + :param container_image_platform: Platform (windows or linux). + :type container_image_platform: str + :param app_service_environment: App Service Environment Properties. + :type app_service_environment: ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironment + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'location': {'required': True}, + 'capacity': {'minimum': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, + 'need_linux_workers': {'key': 'properties.needLinuxWorkers', 'type': 'bool'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'capacity': {'key': 'properties.capacity', 'type': 'int'}, + 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'container_registry_base_url': {'key': 'properties.containerRegistryBaseUrl', 'type': 'str'}, + 'container_registry_username': {'key': 'properties.containerRegistryUsername', 'type': 'str'}, + 'container_registry_password': {'key': 'properties.containerRegistryPassword', 'type': 'str'}, + 'container_image_repository': {'key': 'properties.containerImageRepository', 'type': 'str'}, + 'container_image_tag': {'key': 'properties.containerImageTag', 'type': 'str'}, + 'container_image_platform': {'key': 'properties.containerImagePlatform', 'type': 'str'}, + 'app_service_environment': {'key': 'properties.appServiceEnvironment', 'type': 'AppServiceEnvironment'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateRequest, self).__init__(**kwargs) + self.name = kwargs['name'] + self.type = kwargs['type'] + self.location = kwargs['location'] + self.server_farm_id = kwargs.get('server_farm_id', None) + self.sku_name = kwargs.get('sku_name', None) + self.need_linux_workers = kwargs.get('need_linux_workers', None) + self.is_spot = kwargs.get('is_spot', None) + self.capacity = kwargs.get('capacity', None) + self.hosting_environment = kwargs.get('hosting_environment', None) + self.is_xenon = kwargs.get('is_xenon', None) + self.container_registry_base_url = kwargs.get('container_registry_base_url', None) + self.container_registry_username = kwargs.get('container_registry_username', None) + self.container_registry_password = kwargs.get('container_registry_password', None) + self.container_image_repository = kwargs.get('container_image_repository', None) + self.container_image_tag = kwargs.get('container_image_tag', None) + self.container_image_platform = kwargs.get('container_image_platform', None) + self.app_service_environment = kwargs.get('app_service_environment', None) + + +class ValidateResponse(msrest.serialization.Model): + """Describes the result of resource validation. + + :param status: Result of validation. + :type status: str + :param error: Error details for the case when validation fails. + :type error: ~azure.mgmt.web.v2020_12_01.models.ValidateResponseError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ValidateResponseError'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error = kwargs.get('error', None) + + +class ValidateResponseError(msrest.serialization.Model): + """Error details for when validation fails. + + :param code: Validation error code. + :type code: str + :param message: Validation error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateResponseError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class VirtualApplication(msrest.serialization.Model): + """Virtual application in an app. + + :param virtual_path: Virtual path. + :type virtual_path: str + :param physical_path: Physical path. + :type physical_path: str + :param preload_enabled: :code:`true` if preloading is enabled; otherwise, + :code:`false`. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: list[~azure.mgmt.web.v2020_12_01.models.VirtualDirectory] + """ + + _attribute_map = { + 'virtual_path': {'key': 'virtualPath', 'type': 'str'}, + 'physical_path': {'key': 'physicalPath', 'type': 'str'}, + 'preload_enabled': {'key': 'preloadEnabled', 'type': 'bool'}, + 'virtual_directories': {'key': 'virtualDirectories', 'type': '[VirtualDirectory]'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualApplication, self).__init__(**kwargs) + self.virtual_path = kwargs.get('virtual_path', None) + self.physical_path = kwargs.get('physical_path', None) + self.preload_enabled = kwargs.get('preload_enabled', None) + self.virtual_directories = kwargs.get('virtual_directories', None) + + +class VirtualDirectory(msrest.serialization.Model): + """Directory for virtual application. + + :param virtual_path: Path to virtual application. + :type virtual_path: str + :param physical_path: Physical path. + :type physical_path: str + """ + + _attribute_map = { + 'virtual_path': {'key': 'virtualPath', 'type': 'str'}, + 'physical_path': {'key': 'physicalPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = kwargs.get('virtual_path', None) + self.physical_path = kwargs.get('physical_path', None) + + +class VirtualIPMapping(msrest.serialization.Model): + """Virtual IP mapping. + + :param virtual_ip: Virtual IP address. + :type virtual_ip: str + :param internal_http_port: Internal HTTP port. + :type internal_http_port: int + :param internal_https_port: Internal HTTPS port. + :type internal_https_port: int + :param in_use: Is virtual IP mapping in use. + :type in_use: bool + :param service_name: name of the service that virtual IP is assigned to. + :type service_name: str + """ + + _attribute_map = { + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'internal_http_port': {'key': 'internalHttpPort', 'type': 'int'}, + 'internal_https_port': {'key': 'internalHttpsPort', 'type': 'int'}, + 'in_use': {'key': 'inUse', 'type': 'bool'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualIPMapping, self).__init__(**kwargs) + self.virtual_ip = kwargs.get('virtual_ip', None) + self.internal_http_port = kwargs.get('internal_http_port', None) + self.internal_https_port = kwargs.get('internal_https_port', None) + self.in_use = kwargs.get('in_use', None) + self.service_name = kwargs.get('service_name', None) + + +class VirtualNetworkProfile(msrest.serialization.Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource id of the Virtual Network. + :type id: str + :ivar name: Name of the Virtual Network (read-only). + :vartype name: str + :ivar type: Resource type of the Virtual Network (read-only). + :vartype type: str + :param subnet: Subnet within the Virtual Network. + :type subnet: str + """ + + _validation = { + 'id': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkProfile, self).__init__(**kwargs) + self.id = kwargs['id'] + self.name = None + self.type = None + self.subnet = kwargs.get('subnet', None) + + +class VnetGateway(ProxyOnlyResource): + """The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: The URI where the VPN package can be downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vpn_package_uri': {'key': 'properties.vpnPackageUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VnetGateway, self).__init__(**kwargs) + self.vnet_name = kwargs.get('vnet_name', None) + self.vpn_package_uri = kwargs.get('vpn_package_uri', None) + + +class VnetInfo(ProxyOnlyResource): + """Virtual Network information contract. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param vnet_resource_id: The Virtual Network's resource ID. + :type vnet_resource_id: str + :ivar cert_thumbprint: The client certificate thumbprint. + :vartype cert_thumbprint: str + :param cert_blob: A certificate file (.cer) blob containing the public key of the private key + used to authenticate a + Point-To-Site VPN connection. + :type cert_blob: str + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2020_12_01.models.VnetRoute] + :ivar resync_required: :code:`true` if a resync is required; otherwise, + :code:`false`. + :vartype resync_required: bool + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. + :type dns_servers: str + :param is_swift: Flag that is used to denote if this is VNET injection. + :type is_swift: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'cert_thumbprint': {'readonly': True}, + 'routes': {'readonly': True}, + 'resync_required': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'vnet_resource_id': {'key': 'properties.vnetResourceId', 'type': 'str'}, + 'cert_thumbprint': {'key': 'properties.certThumbprint', 'type': 'str'}, + 'cert_blob': {'key': 'properties.certBlob', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + 'is_swift': {'key': 'properties.isSwift', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(VnetInfo, self).__init__(**kwargs) + self.vnet_resource_id = kwargs.get('vnet_resource_id', None) + self.cert_thumbprint = None + self.cert_blob = kwargs.get('cert_blob', None) + self.routes = None + self.resync_required = None + self.dns_servers = kwargs.get('dns_servers', None) + self.is_swift = kwargs.get('is_swift', None) + + +class VnetParameters(ProxyOnlyResource): + """The required set of inputs to validate a VNET. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param vnet_resource_group: The Resource Group of the VNET to be validated. + :type vnet_resource_group: str + :param vnet_name: The name of the VNET to be validated. + :type vnet_name: str + :param vnet_subnet_name: The subnet name to be validated. + :type vnet_subnet_name: str + :param subnet_resource_id: The ARM Resource ID of the subnet to validate. + :type subnet_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'vnet_resource_group': {'key': 'properties.vnetResourceGroup', 'type': 'str'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'subnet_resource_id': {'key': 'properties.subnetResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VnetParameters, self).__init__(**kwargs) + self.vnet_resource_group = kwargs.get('vnet_resource_group', None) + self.vnet_name = kwargs.get('vnet_name', None) + self.vnet_subnet_name = kwargs.get('vnet_subnet_name', None) + self.subnet_resource_id = kwargs.get('subnet_resource_id', None) + + +class VnetRoute(ProxyOnlyResource): + """Virtual Network route contract used to pass routing information for a Virtual Network. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param start_address: The starting address for this route. This may also include a CIDR + notation, in which case the end address must not be specified. + :type start_address: str + :param end_address: The ending address for this route. If the start address is specified in + CIDR notation, this must be omitted. + :type end_address: str + :param route_type: The type of route this is: + DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 + INHERITED - Routes inherited from the real Virtual Network routes + STATIC - Static route set on the app only + + These values will be used for syncing an app's routes with those from a Virtual Network. + Possible values include: "DEFAULT", "INHERITED", "STATIC". + :type route_type: str or ~azure.mgmt.web.v2020_12_01.models.RouteType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_address': {'key': 'properties.startAddress', 'type': 'str'}, + 'end_address': {'key': 'properties.endAddress', 'type': 'str'}, + 'route_type': {'key': 'properties.routeType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VnetRoute, self).__init__(**kwargs) + self.start_address = kwargs.get('start_address', None) + self.end_address = kwargs.get('end_address', None) + self.route_type = kwargs.get('route_type', None) + + +class VnetValidationFailureDetails(ProxyOnlyResource): + """A class that describes the reason for a validation failure. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param message: Text describing the validation outcome. + :type message: str + :param failed: A flag describing whether or not validation failed. + :type failed: bool + :param failed_tests: A list of tests that failed in the validation. + :type failed_tests: list[~azure.mgmt.web.v2020_12_01.models.VnetValidationTestFailure] + :param warnings: A list of warnings generated during validation. + :type warnings: list[~azure.mgmt.web.v2020_12_01.models.VnetValidationTestFailure] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'message': {'key': 'properties.message', 'type': 'str'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + 'warnings': {'key': 'properties.warnings', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__( + self, + **kwargs + ): + super(VnetValidationFailureDetails, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.failed = kwargs.get('failed', None) + self.failed_tests = kwargs.get('failed_tests', None) + self.warnings = kwargs.get('warnings', None) + + +class VnetValidationTestFailure(ProxyOnlyResource): + """A class that describes a test that failed during NSG and UDR validation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param test_name: The name of the test that failed. + :type test_name: str + :param details: The details of what caused the failure, e.g. the blocking rule name, etc. + :type details: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'test_name': {'key': 'properties.testName', 'type': 'str'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VnetValidationTestFailure, self).__init__(**kwargs) + self.test_name = kwargs.get('test_name', None) + self.details = kwargs.get('details', None) + + +class WebAppCollection(msrest.serialization.Model): + """Collection of App Service apps. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Site] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Site]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class WebAppInstanceStatusCollection(msrest.serialization.Model): + """Collection of app instances. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebSiteInstanceStatus]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppInstanceStatusCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class WebAppMajorVersion(msrest.serialization.Model): + """Web App stack major version. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_text: Web App stack major version (display only). + :vartype display_text: str + :ivar value: Web App stack major version name. + :vartype value: str + :ivar minor_versions: Minor versions associated with the major version. + :vartype minor_versions: list[~azure.mgmt.web.v2020_12_01.models.WebAppMinorVersion] + """ + + _validation = { + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'minor_versions': {'readonly': True}, + } + + _attribute_map = { + 'display_text': {'key': 'displayText', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'minor_versions': {'key': 'minorVersions', 'type': '[WebAppMinorVersion]'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppMajorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.minor_versions = None + + +class WebAppMinorVersion(msrest.serialization.Model): + """Web App stack minor version. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_text: Web App stack minor version (display only). + :vartype display_text: str + :ivar value: Web App stack major version name. + :vartype value: str + :ivar stack_settings: Settings associated with the minor version. + :vartype stack_settings: ~azure.mgmt.web.v2020_12_01.models.WebAppRuntimes + """ + + _validation = { + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'stack_settings': {'readonly': True}, + } + + _attribute_map = { + 'display_text': {'key': 'displayText', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'stack_settings': {'key': 'stackSettings', 'type': 'WebAppRuntimes'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppMinorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.stack_settings = None + + +class WebAppRuntimes(msrest.serialization.Model): + """Web App stack runtimes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar linux_runtime_settings: Linux-specific settings associated with the minor version. + :vartype linux_runtime_settings: ~azure.mgmt.web.v2020_12_01.models.WebAppRuntimeSettings + :ivar windows_runtime_settings: Windows-specific settings associated with the minor version. + :vartype windows_runtime_settings: ~azure.mgmt.web.v2020_12_01.models.WebAppRuntimeSettings + :ivar linux_container_settings: Linux-specific settings associated with the Java container + minor version. + :vartype linux_container_settings: + ~azure.mgmt.web.v2020_12_01.models.LinuxJavaContainerSettings + :ivar windows_container_settings: Windows-specific settings associated with the Java container + minor version. + :vartype windows_container_settings: + ~azure.mgmt.web.v2020_12_01.models.WindowsJavaContainerSettings + """ + + _validation = { + 'linux_runtime_settings': {'readonly': True}, + 'windows_runtime_settings': {'readonly': True}, + 'linux_container_settings': {'readonly': True}, + 'windows_container_settings': {'readonly': True}, + } + + _attribute_map = { + 'linux_runtime_settings': {'key': 'linuxRuntimeSettings', 'type': 'WebAppRuntimeSettings'}, + 'windows_runtime_settings': {'key': 'windowsRuntimeSettings', 'type': 'WebAppRuntimeSettings'}, + 'linux_container_settings': {'key': 'linuxContainerSettings', 'type': 'LinuxJavaContainerSettings'}, + 'windows_container_settings': {'key': 'windowsContainerSettings', 'type': 'WindowsJavaContainerSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppRuntimes, self).__init__(**kwargs) + self.linux_runtime_settings = None + self.windows_runtime_settings = None + self.linux_container_settings = None + self.windows_container_settings = None + + +class WebAppRuntimeSettings(msrest.serialization.Model): + """Web App runtime settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar runtime_version: Web App stack minor version (runtime only). + :vartype runtime_version: str + :ivar remote_debugging_supported: :code:`true` if remote debugging is supported + for the stack; otherwise, :code:`false`. + :vartype remote_debugging_supported: bool + :ivar app_insights_settings: Application Insights settings associated with the minor version. + :vartype app_insights_settings: + ~azure.mgmt.web.v2020_12_01.models.AppInsightsWebAppStackSettings + :ivar git_hub_action_settings: GitHub Actions settings associated with the minor version. + :vartype git_hub_action_settings: + ~azure.mgmt.web.v2020_12_01.models.GitHubActionWebAppStackSettings + :ivar is_preview: :code:`true` if the stack is in preview; otherwise, + :code:`false`. + :vartype is_preview: bool + :ivar is_deprecated: :code:`true` if the stack is deprecated; otherwise, + :code:`false`. + :vartype is_deprecated: bool + :ivar is_hidden: :code:`true` if the stack should be hidden; otherwise, + :code:`false`. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: ~datetime.datetime + :ivar is_auto_update: :code:`true` if the stack version is auto-updated; + otherwise, :code:`false`. + :vartype is_auto_update: bool + :ivar is_early_access: :code:`true` if the minor version is early-access; + otherwise, :code:`false`. + :vartype is_early_access: bool + """ + + _validation = { + 'runtime_version': {'readonly': True}, + 'remote_debugging_supported': {'readonly': True}, + 'app_insights_settings': {'readonly': True}, + 'git_hub_action_settings': {'readonly': True}, + 'is_preview': {'readonly': True}, + 'is_deprecated': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'end_of_life_date': {'readonly': True}, + 'is_auto_update': {'readonly': True}, + 'is_early_access': {'readonly': True}, + } + + _attribute_map = { + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'remote_debugging_supported': {'key': 'remoteDebuggingSupported', 'type': 'bool'}, + 'app_insights_settings': {'key': 'appInsightsSettings', 'type': 'AppInsightsWebAppStackSettings'}, + 'git_hub_action_settings': {'key': 'gitHubActionSettings', 'type': 'GitHubActionWebAppStackSettings'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'is_auto_update': {'key': 'isAutoUpdate', 'type': 'bool'}, + 'is_early_access': {'key': 'isEarlyAccess', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppRuntimeSettings, self).__init__(**kwargs) + self.runtime_version = None + self.remote_debugging_supported = None + self.app_insights_settings = None + self.git_hub_action_settings = None + self.is_preview = None + self.is_deprecated = None + self.is_hidden = None + self.end_of_life_date = None + self.is_auto_update = None + self.is_early_access = None + + +class WebAppStack(ProxyOnlyResource): + """Web App stack. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Web App stack location. + :vartype location: str + :ivar display_text: Web App stack (display only). + :vartype display_text: str + :ivar value: Web App stack name. + :vartype value: str + :ivar major_versions: List of major versions available. + :vartype major_versions: list[~azure.mgmt.web.v2020_12_01.models.WebAppMajorVersion] + :ivar preferred_os: Web App stack preferred OS. Possible values include: "Windows", "Linux". + :vartype preferred_os: str or ~azure.mgmt.web.v2020_12_01.models.StackPreferredOs + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'major_versions': {'readonly': True}, + 'preferred_os': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'display_text': {'key': 'properties.displayText', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'major_versions': {'key': 'properties.majorVersions', 'type': '[WebAppMajorVersion]'}, + 'preferred_os': {'key': 'properties.preferredOs', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppStack, self).__init__(**kwargs) + self.location = None + self.display_text = None + self.value = None + self.major_versions = None + self.preferred_os = None + + +class WebAppStackCollection(msrest.serialization.Model): + """Collection of Web app Stacks. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.WebAppStack] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebAppStack]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppStackCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class WebJob(ProxyOnlyResource): + """Web Job Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param run_command: Run command. + :type run_command: str + :param url: Job URL. + :type url: str + :param extra_info_url: Extra Info URL. + :type extra_info_url: str + :param web_job_type: Job type. Possible values include: "Continuous", "Triggered". + :type web_job_type: str or ~azure.mgmt.web.v2020_12_01.models.WebJobType + :param error: Error information. + :type error: str + :param using_sdk: Using SDK?. + :type using_sdk: bool + :param settings: Job settings. + :type settings: dict[str, object] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + super(WebJob, self).__init__(**kwargs) + self.run_command = kwargs.get('run_command', None) + self.url = kwargs.get('url', None) + self.extra_info_url = kwargs.get('extra_info_url', None) + self.web_job_type = kwargs.get('web_job_type', None) + self.error = kwargs.get('error', None) + self.using_sdk = kwargs.get('using_sdk', None) + self.settings = kwargs.get('settings', None) + + +class WebJobCollection(msrest.serialization.Model): + """Collection of Kudu web job information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.WebJob] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebJob]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebJobCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class WebSiteInstanceStatus(ProxyOnlyResource): + """WebSiteInstanceStatus. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param state: Possible values include: "READY", "STOPPED", "UNKNOWN". + :type state: str or ~azure.mgmt.web.v2020_12_01.models.SiteRuntimeState + :param status_url: Link to the GetStatusApi in Kudu. + :type status_url: str + :param detector_url: Link to the Diagnose and Solve Portal. + :type detector_url: str + :param console_url: Link to the console to web app instance. + :type console_url: str + :param health_check_url: Link to the console to web app instance. + :type health_check_url: str + :param containers: Dictionary of :code:``. + :type containers: dict[str, ~azure.mgmt.web.v2020_12_01.models.ContainerInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'status_url': {'key': 'properties.statusUrl', 'type': 'str'}, + 'detector_url': {'key': 'properties.detectorUrl', 'type': 'str'}, + 'console_url': {'key': 'properties.consoleUrl', 'type': 'str'}, + 'health_check_url': {'key': 'properties.healthCheckUrl', 'type': 'str'}, + 'containers': {'key': 'properties.containers', 'type': '{ContainerInfo}'}, + } + + def __init__( + self, + **kwargs + ): + super(WebSiteInstanceStatus, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.status_url = kwargs.get('status_url', None) + self.detector_url = kwargs.get('detector_url', None) + self.console_url = kwargs.get('console_url', None) + self.health_check_url = kwargs.get('health_check_url', None) + self.containers = kwargs.get('containers', None) + + +class WindowsJavaContainerSettings(msrest.serialization.Model): + """Windows Java Container settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar java_container: Java container (runtime only). + :vartype java_container: str + :ivar java_container_version: Java container version (runtime only). + :vartype java_container_version: str + :ivar is_preview: :code:`true` if the stack is in preview; otherwise, + :code:`false`. + :vartype is_preview: bool + :ivar is_deprecated: :code:`true` if the stack is deprecated; otherwise, + :code:`false`. + :vartype is_deprecated: bool + :ivar is_hidden: :code:`true` if the stack should be hidden; otherwise, + :code:`false`. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: ~datetime.datetime + :ivar is_auto_update: :code:`true` if the stack version is auto-updated; + otherwise, :code:`false`. + :vartype is_auto_update: bool + :ivar is_early_access: :code:`true` if the minor version is early-access; + otherwise, :code:`false`. + :vartype is_early_access: bool + """ + + _validation = { + 'java_container': {'readonly': True}, + 'java_container_version': {'readonly': True}, + 'is_preview': {'readonly': True}, + 'is_deprecated': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'end_of_life_date': {'readonly': True}, + 'is_auto_update': {'readonly': True}, + 'is_early_access': {'readonly': True}, + } + + _attribute_map = { + 'java_container': {'key': 'javaContainer', 'type': 'str'}, + 'java_container_version': {'key': 'javaContainerVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'is_auto_update': {'key': 'isAutoUpdate', 'type': 'bool'}, + 'is_early_access': {'key': 'isEarlyAccess', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(WindowsJavaContainerSettings, self).__init__(**kwargs) + self.java_container = None + self.java_container_version = None + self.is_preview = None + self.is_deprecated = None + self.is_hidden = None + self.end_of_life_date = None + self.is_auto_update = None + self.is_early_access = None + + +class WorkerPoolCollection(msrest.serialization.Model): + """Collection of worker pools. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkerPoolResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WorkerPoolCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class WorkerPoolResource(ProxyOnlyResource): + """Worker pool of an App Service Environment ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param sku: Description of a SKU for a scalable resource. + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param worker_size_id: Worker size ID for referencing this worker pool. + :type worker_size_id: int + :param compute_mode: Shared or dedicated app hosting. Possible values include: "Shared", + "Dedicated", "Dynamic". + :type compute_mode: str or ~azure.mgmt.web.v2020_12_01.models.ComputeModeOptions + :param worker_size: VM size of the worker pool instances. + :type worker_size: str + :param worker_count: Number of instances in the worker pool. + :type worker_count: int + :ivar instance_names: Names of all instances in the worker pool (read only). + :vartype instance_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'str'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(WorkerPoolResource, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.worker_size_id = kwargs.get('worker_size_id', None) + self.compute_mode = kwargs.get('compute_mode', None) + self.worker_size = kwargs.get('worker_size', None) + self.worker_count = kwargs.get('worker_count', None) + self.instance_names = None diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_models_py3.py new file mode 100644 index 000000000000..ecbd720d3d88 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_models_py3.py @@ -0,0 +1,20772 @@ +# 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 datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._web_site_management_client_enums import * + + +class AbnormalTimePeriod(msrest.serialization.Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime. + :type start_time: ~datetime.datetime + :param end_time: End time of the downtime. + :type end_time: ~datetime.datetime + :param events: List of Possible Cause of downtime. + :type events: list[~azure.mgmt.web.v2020_12_01.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions. + :type solutions: list[~azure.mgmt.web.v2020_12_01.models.Solution] + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'events': {'key': 'events', 'type': '[DetectorAbnormalTimePeriod]'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__( + self, + *, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + events: Optional[List["DetectorAbnormalTimePeriod"]] = None, + solutions: Optional[List["Solution"]] = None, + **kwargs + ): + super(AbnormalTimePeriod, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.events = events + self.solutions = solutions + + +class Address(msrest.serialization.Model): + """Address information for domain registration. + + All required parameters must be populated in order to send to Azure. + + :param address1: Required. First line of an Address. + :type address1: str + :param address2: The second line of the Address. Optional. + :type address2: str + :param city: Required. The city for the address. + :type city: str + :param country: Required. The country for the address. + :type country: str + :param postal_code: Required. The postal code for the address. + :type postal_code: str + :param state: Required. The state or province for the address. + :type state: str + """ + + _validation = { + 'address1': {'required': True}, + 'city': {'required': True}, + 'country': {'required': True}, + 'postal_code': {'required': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'address1': {'key': 'address1', 'type': 'str'}, + 'address2': {'key': 'address2', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + *, + address1: str, + city: str, + country: str, + postal_code: str, + state: str, + address2: Optional[str] = None, + **kwargs + ): + super(Address, self).__init__(**kwargs) + self.address1 = address1 + self.address2 = address2 + self.city = city + self.country = country + self.postal_code = postal_code + self.state = state + + +class ProxyOnlyResource(msrest.serialization.Model): + """Azure proxy only resource. This resource is not tracked by Azure Resource Manager. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.type = None + + +class AddressResponse(ProxyOnlyResource): + """Describes main public IP address and any extra virtual IPs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param service_ip_address: Main public virtual IP. + :type service_ip_address: str + :param internal_ip_address: Virtual Network internal IP address of the App Service Environment + if it is in internal load-balancing mode. + :type internal_ip_address: str + :param outbound_ip_addresses: IP addresses appearing on outbound connections. + :type outbound_ip_addresses: list[str] + :param vip_mappings: Additional virtual IPs. + :type vip_mappings: list[~azure.mgmt.web.v2020_12_01.models.VirtualIPMapping] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_ip_address': {'key': 'properties.serviceIpAddress', 'type': 'str'}, + 'internal_ip_address': {'key': 'properties.internalIpAddress', 'type': 'str'}, + 'outbound_ip_addresses': {'key': 'properties.outboundIpAddresses', 'type': '[str]'}, + 'vip_mappings': {'key': 'properties.vipMappings', 'type': '[VirtualIPMapping]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + service_ip_address: Optional[str] = None, + internal_ip_address: Optional[str] = None, + outbound_ip_addresses: Optional[List[str]] = None, + vip_mappings: Optional[List["VirtualIPMapping"]] = None, + **kwargs + ): + super(AddressResponse, self).__init__(kind=kind, **kwargs) + self.service_ip_address = service_ip_address + self.internal_ip_address = internal_ip_address + self.outbound_ip_addresses = outbound_ip_addresses + self.vip_mappings = vip_mappings + + +class AllowedAudiencesValidation(ProxyOnlyResource): + """AllowedAudiencesValidation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param allowed_audiences: + :type allowed_audiences: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + allowed_audiences: Optional[List[str]] = None, + **kwargs + ): + super(AllowedAudiencesValidation, self).__init__(kind=kind, **kwargs) + self.allowed_audiences = allowed_audiences + + +class AnalysisData(msrest.serialization.Model): + """Class Representing Detector Evidence used for analysis. + + :param source: Name of the Detector. + :type source: str + :param detector_definition: Detector Definition. + :type detector_definition: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition + :param metrics: Source Metrics. + :type metrics: list[~azure.mgmt.web.v2020_12_01.models.DiagnosticMetricSet] + :param data: Additional Source Data. + :type data: list[list[~azure.mgmt.web.v2020_12_01.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data. + :type detector_meta_data: ~azure.mgmt.web.v2020_12_01.models.ResponseMetaData + """ + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'detector_definition': {'key': 'detectorDefinition', 'type': 'DetectorDefinition'}, + 'metrics': {'key': 'metrics', 'type': '[DiagnosticMetricSet]'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'detector_meta_data': {'key': 'detectorMetaData', 'type': 'ResponseMetaData'}, + } + + def __init__( + self, + *, + source: Optional[str] = None, + detector_definition: Optional["DetectorDefinition"] = None, + metrics: Optional[List["DiagnosticMetricSet"]] = None, + data: Optional[List[List["NameValuePair"]]] = None, + detector_meta_data: Optional["ResponseMetaData"] = None, + **kwargs + ): + super(AnalysisData, self).__init__(**kwargs) + self.source = source + self.detector_definition = detector_definition + self.metrics = metrics + self.data = data + self.detector_meta_data = detector_meta_data + + +class AnalysisDefinition(ProxyOnlyResource): + """Definition of Analysis. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar description: Description of the Analysis. + :vartype description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(AnalysisDefinition, self).__init__(kind=kind, **kwargs) + self.description = None + + +class ApiDefinitionInfo(msrest.serialization.Model): + """Information about the formal API definition for the app. + + :param url: The URL of the API definition. + :type url: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + *, + url: Optional[str] = None, + **kwargs + ): + super(ApiDefinitionInfo, self).__init__(**kwargs) + self.url = url + + +class ApiKVReference(ProxyOnlyResource): + """Description of site key vault references. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param reference: + :type reference: str + :param status: Possible values include: "Initialized", "Resolved", "InvalidSyntax", + "MSINotEnabled", "VaultNotFound", "SecretNotFound", "SecretVersionNotFound", + "AccessToKeyVaultDenied", "OtherReasons", "FetchTimedOut", "UnauthorizedClient". + :type status: str or ~azure.mgmt.web.v2020_12_01.models.ResolveStatus + :param vault_name: + :type vault_name: str + :param secret_name: + :type secret_name: str + :param secret_version: + :type secret_version: str + :param identity_type: Managed service identity. + :type identity_type: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :param details: + :type details: str + :ivar source: Default value: "KeyVault". + :vartype source: str + :param active_version: + :type active_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'reference': {'key': 'properties.reference', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'secret_name': {'key': 'properties.secretName', 'type': 'str'}, + 'secret_version': {'key': 'properties.secretVersion', 'type': 'str'}, + 'identity_type': {'key': 'properties.identityType', 'type': 'ManagedServiceIdentity'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'active_version': {'key': 'properties.activeVersion', 'type': 'str'}, + } + + source = "KeyVault" + + def __init__( + self, + *, + kind: Optional[str] = None, + reference: Optional[str] = None, + status: Optional[Union[str, "ResolveStatus"]] = None, + vault_name: Optional[str] = None, + secret_name: Optional[str] = None, + secret_version: Optional[str] = None, + identity_type: Optional["ManagedServiceIdentity"] = None, + details: Optional[str] = None, + active_version: Optional[str] = None, + **kwargs + ): + super(ApiKVReference, self).__init__(kind=kind, **kwargs) + self.reference = reference + self.status = status + self.vault_name = vault_name + self.secret_name = secret_name + self.secret_version = secret_version + self.identity_type = identity_type + self.details = details + self.active_version = active_version + + +class ApiKVReferenceCollection(msrest.serialization.Model): + """ApiKVReferenceCollection. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ApiKVReference] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApiKVReference]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["ApiKVReference"], + **kwargs + ): + super(ApiKVReferenceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ApiManagementConfig(msrest.serialization.Model): + """Azure API management (APIM) configuration linked to the app. + + :param id: APIM-Api Identifier. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(ApiManagementConfig, self).__init__(**kwargs) + self.id = id + + +class AppInsightsWebAppStackSettings(msrest.serialization.Model): + """App Insights Web App stack settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar is_supported: :code:`true` if remote Application Insights is supported for + the stack; otherwise, :code:`false`. + :vartype is_supported: bool + :ivar is_default_off: :code:`true` if Application Insights is disabled by default + for the stack; otherwise, :code:`false`. + :vartype is_default_off: bool + """ + + _validation = { + 'is_supported': {'readonly': True}, + 'is_default_off': {'readonly': True}, + } + + _attribute_map = { + 'is_supported': {'key': 'isSupported', 'type': 'bool'}, + 'is_default_off': {'key': 'isDefaultOff', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AppInsightsWebAppStackSettings, self).__init__(**kwargs) + self.is_supported = None + self.is_default_off = None + + +class Apple(ProxyOnlyResource): + """Apple. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.AppleRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.LoginScopes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'AppleRegistration'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + registration: Optional["AppleRegistration"] = None, + login: Optional["LoginScopes"] = None, + **kwargs + ): + super(Apple, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + + +class AppleRegistration(ProxyOnlyResource): + """AppleRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param client_id: + :type client_id: str + :param client_secret_setting_name: + :type client_secret_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + **kwargs + ): + super(AppleRegistration, self).__init__(kind=kind, **kwargs) + self.client_id = client_id + self.client_secret_setting_name = client_secret_setting_name + + +class ApplicationLogsConfig(msrest.serialization.Model): + """Application logs configuration. + + :param file_system: Application logs to file system configuration. + :type file_system: ~azure.mgmt.web.v2020_12_01.models.FileSystemApplicationLogsConfig + :param azure_table_storage: Application logs to azure table storage configuration. + :type azure_table_storage: + ~azure.mgmt.web.v2020_12_01.models.AzureTableStorageApplicationLogsConfig + :param azure_blob_storage: Application logs to blob storage configuration. + :type azure_blob_storage: + ~azure.mgmt.web.v2020_12_01.models.AzureBlobStorageApplicationLogsConfig + """ + + _attribute_map = { + 'file_system': {'key': 'fileSystem', 'type': 'FileSystemApplicationLogsConfig'}, + 'azure_table_storage': {'key': 'azureTableStorage', 'type': 'AzureTableStorageApplicationLogsConfig'}, + 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageApplicationLogsConfig'}, + } + + def __init__( + self, + *, + file_system: Optional["FileSystemApplicationLogsConfig"] = None, + azure_table_storage: Optional["AzureTableStorageApplicationLogsConfig"] = None, + azure_blob_storage: Optional["AzureBlobStorageApplicationLogsConfig"] = None, + **kwargs + ): + super(ApplicationLogsConfig, self).__init__(**kwargs) + self.file_system = file_system + self.azure_table_storage = azure_table_storage + self.azure_blob_storage = azure_blob_storage + + +class ApplicationStack(msrest.serialization.Model): + """Application stack. + + :param name: Application stack name. + :type name: str + :param display: Application stack display name. + :type display: str + :param dependency: Application stack dependency. + :type dependency: str + :param major_versions: List of major versions available. + :type major_versions: list[~azure.mgmt.web.v2020_12_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: list[~azure.mgmt.web.v2020_12_01.models.ApplicationStack] + :param is_deprecated: :code:`true` if this is the stack is deprecated; otherwise, + :code:`false`. + :type is_deprecated: list[~azure.mgmt.web.v2020_12_01.models.ApplicationStack] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'str'}, + 'dependency': {'key': 'dependency', 'type': 'str'}, + 'major_versions': {'key': 'majorVersions', 'type': '[StackMajorVersion]'}, + 'frameworks': {'key': 'frameworks', 'type': '[ApplicationStack]'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': '[ApplicationStack]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional[str] = None, + dependency: Optional[str] = None, + major_versions: Optional[List["StackMajorVersion"]] = None, + frameworks: Optional[List["ApplicationStack"]] = None, + is_deprecated: Optional[List["ApplicationStack"]] = None, + **kwargs + ): + super(ApplicationStack, self).__init__(**kwargs) + self.name = name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + self.is_deprecated = is_deprecated + + +class ApplicationStackCollection(msrest.serialization.Model): + """Collection of Application Stacks. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ApplicationStackResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationStackResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["ApplicationStackResource"], + **kwargs + ): + super(ApplicationStackCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ApplicationStackResource(ProxyOnlyResource): + """ARM resource for a ApplicationStack. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param name_properties_name: Application stack name. + :type name_properties_name: str + :param display: Application stack display name. + :type display: str + :param dependency: Application stack dependency. + :type dependency: str + :param major_versions: List of major versions available. + :type major_versions: list[~azure.mgmt.web.v2020_12_01.models.StackMajorVersion] + :param frameworks: List of frameworks associated with application stack. + :type frameworks: list[~azure.mgmt.web.v2020_12_01.models.ApplicationStack] + :param is_deprecated: :code:`true` if this is the stack is deprecated; otherwise, + :code:`false`. + :type is_deprecated: list[~azure.mgmt.web.v2020_12_01.models.ApplicationStack] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'display': {'key': 'properties.display', 'type': 'str'}, + 'dependency': {'key': 'properties.dependency', 'type': 'str'}, + 'major_versions': {'key': 'properties.majorVersions', 'type': '[StackMajorVersion]'}, + 'frameworks': {'key': 'properties.frameworks', 'type': '[ApplicationStack]'}, + 'is_deprecated': {'key': 'properties.isDeprecated', 'type': '[ApplicationStack]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + name_properties_name: Optional[str] = None, + display: Optional[str] = None, + dependency: Optional[str] = None, + major_versions: Optional[List["StackMajorVersion"]] = None, + frameworks: Optional[List["ApplicationStack"]] = None, + is_deprecated: Optional[List["ApplicationStack"]] = None, + **kwargs + ): + super(ApplicationStackResource, self).__init__(kind=kind, **kwargs) + self.name_properties_name = name_properties_name + self.display = display + self.dependency = dependency + self.major_versions = major_versions + self.frameworks = frameworks + self.is_deprecated = is_deprecated + + +class AppRegistration(ProxyOnlyResource): + """AppRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param app_id: + :type app_id: str + :param app_secret_setting_name: + :type app_secret_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'app_id': {'key': 'properties.appId', 'type': 'str'}, + 'app_secret_setting_name': {'key': 'properties.appSecretSettingName', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + **kwargs + ): + super(AppRegistration, self).__init__(kind=kind, **kwargs) + self.app_id = app_id + self.app_secret_setting_name = app_secret_setting_name + + +class AppServiceCertificate(msrest.serialization.Model): + """Key Vault container for a certificate that is purchased through Azure. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param key_vault_id: Key Vault resource Id. + :type key_vault_id: str + :param key_vault_secret_name: Key Vault secret name. + :type key_vault_secret_name: str + :ivar provisioning_state: Status of the Key Vault secret. Possible values include: + "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", + "Unknown". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.KeyVaultSecretStatus + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'keyVaultSecretName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + key_vault_id: Optional[str] = None, + key_vault_secret_name: Optional[str] = None, + **kwargs + ): + super(AppServiceCertificate, self).__init__(**kwargs) + self.key_vault_id = key_vault_id + self.key_vault_secret_name = key_vault_secret_name + self.provisioning_state = None + + +class AppServiceCertificateCollection(msrest.serialization.Model): + """Collection of certificate order certificates. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppServiceCertificateResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["AppServiceCertificateResource"], + **kwargs + ): + super(AppServiceCertificateCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Resource(msrest.serialization.Model): + """Azure resource. This resource is tracked in Azure Resource Manager. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.kind = kind + self.location = location + self.type = None + self.tags = tags + + +class AppServiceCertificateOrder(Resource): + """SSL certificate purchase order. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificate] + :param distinguished_name: Certificate distinguished name. + :type distinguished_name: str + :ivar domain_verification_token: Domain verification token. + :vartype domain_verification_token: str + :param validity_in_years: Duration in years (must be 1). + :type validity_in_years: int + :param key_size: Certificate key size. + :type key_size: int + :param product_type: Certificate product type. Possible values include: + "StandardDomainValidatedSsl", "StandardDomainValidatedWildCardSsl". + :type product_type: str or ~azure.mgmt.web.v2020_12_01.models.CertificateProductType + :param auto_renew: :code:`true` if the certificate should be automatically renewed + when it expires; otherwise, :code:`false`. + :type auto_renew: bool + :ivar provisioning_state: Status of certificate order. Possible values include: "Succeeded", + "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar status: Current order status. Possible values include: "Pendingissuance", "Issued", + "Revoked", "Canceled", "Denied", "Pendingrevocation", "PendingRekey", "Unused", "Expired", + "NotSubmitted". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :param csr: Last CSR that was created for this order. + :type csr: str + :ivar intermediate: Intermediate certificate. + :vartype intermediate: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :ivar serial_number: Current serial number of the certificate. + :vartype serial_number: str + :ivar last_certificate_issuance_time: Certificate last issuance time. + :vartype last_certificate_issuance_time: ~datetime.datetime + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: ~datetime.datetime + :ivar is_private_key_external: :code:`true` if private key is external; otherwise, + :code:`false`. + :vartype is_private_key_external: bool + :ivar app_service_certificate_not_renewable_reasons: Reasons why App Service Certificate is not + renewable at the current moment. + :vartype app_service_certificate_not_renewable_reasons: list[str or + ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would be auto renewed next. + :vartype next_auto_renewal_time_stamp: ~datetime.datetime + :ivar contact: Contact info. + :vartype contact: ~azure.mgmt.web.v2020_12_01.models.CertificateOrderContact + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'signed_certificate': {'readonly': True}, + 'intermediate': {'readonly': True}, + 'root': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'last_certificate_issuance_time': {'readonly': True}, + 'expiration_time': {'readonly': True}, + 'is_private_key_external': {'readonly': True}, + 'app_service_certificate_not_renewable_reasons': {'readonly': True}, + 'next_auto_renewal_time_stamp': {'readonly': True}, + 'contact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'certificates': {'key': 'properties.certificates', 'type': '{AppServiceCertificate}'}, + 'distinguished_name': {'key': 'properties.distinguishedName', 'type': 'str'}, + 'domain_verification_token': {'key': 'properties.domainVerificationToken', 'type': 'str'}, + 'validity_in_years': {'key': 'properties.validityInYears', 'type': 'int'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'product_type': {'key': 'properties.productType', 'type': 'str'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'signed_certificate': {'key': 'properties.signedCertificate', 'type': 'CertificateDetails'}, + 'csr': {'key': 'properties.csr', 'type': 'str'}, + 'intermediate': {'key': 'properties.intermediate', 'type': 'CertificateDetails'}, + 'root': {'key': 'properties.root', 'type': 'CertificateDetails'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'last_certificate_issuance_time': {'key': 'properties.lastCertificateIssuanceTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, + 'app_service_certificate_not_renewable_reasons': {'key': 'properties.appServiceCertificateNotRenewableReasons', 'type': '[str]'}, + 'next_auto_renewal_time_stamp': {'key': 'properties.nextAutoRenewalTimeStamp', 'type': 'iso-8601'}, + 'contact': {'key': 'properties.contact', 'type': 'CertificateOrderContact'}, + } + + def __init__( + self, + *, + location: str, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + certificates: Optional[Dict[str, "AppServiceCertificate"]] = None, + distinguished_name: Optional[str] = None, + validity_in_years: Optional[int] = 1, + key_size: Optional[int] = 2048, + product_type: Optional[Union[str, "CertificateProductType"]] = None, + auto_renew: Optional[bool] = True, + csr: Optional[str] = None, + **kwargs + ): + super(AppServiceCertificateOrder, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.certificates = certificates + self.distinguished_name = distinguished_name + self.domain_verification_token = None + self.validity_in_years = validity_in_years + self.key_size = key_size + self.product_type = product_type + self.auto_renew = auto_renew + self.provisioning_state = None + self.status = None + self.signed_certificate = None + self.csr = csr + self.intermediate = None + self.root = None + self.serial_number = None + self.last_certificate_issuance_time = None + self.expiration_time = None + self.is_private_key_external = None + self.app_service_certificate_not_renewable_reasons = None + self.next_auto_renewal_time_stamp = None + self.contact = None + + +class AppServiceCertificateOrderCollection(msrest.serialization.Model): + """Collection of certificate orders. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppServiceCertificateOrder]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["AppServiceCertificateOrder"], + **kwargs + ): + super(AppServiceCertificateOrderCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AppServiceCertificateOrderPatchResource(ProxyOnlyResource): + """ARM resource for a certificate order that is purchased through Azure. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param certificates: State of the Key Vault secret. + :type certificates: dict[str, ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificate] + :param distinguished_name: Certificate distinguished name. + :type distinguished_name: str + :ivar domain_verification_token: Domain verification token. + :vartype domain_verification_token: str + :param validity_in_years: Duration in years (must be 1). + :type validity_in_years: int + :param key_size: Certificate key size. + :type key_size: int + :param product_type: Certificate product type. Possible values include: + "StandardDomainValidatedSsl", "StandardDomainValidatedWildCardSsl". + :type product_type: str or ~azure.mgmt.web.v2020_12_01.models.CertificateProductType + :param auto_renew: :code:`true` if the certificate should be automatically renewed + when it expires; otherwise, :code:`false`. + :type auto_renew: bool + :ivar provisioning_state: Status of certificate order. Possible values include: "Succeeded", + "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar status: Current order status. Possible values include: "Pendingissuance", "Issued", + "Revoked", "Canceled", "Denied", "Pendingrevocation", "PendingRekey", "Unused", "Expired", + "NotSubmitted". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.CertificateOrderStatus + :ivar signed_certificate: Signed certificate. + :vartype signed_certificate: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :param csr: Last CSR that was created for this order. + :type csr: str + :ivar intermediate: Intermediate certificate. + :vartype intermediate: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :ivar root: Root certificate. + :vartype root: ~azure.mgmt.web.v2020_12_01.models.CertificateDetails + :ivar serial_number: Current serial number of the certificate. + :vartype serial_number: str + :ivar last_certificate_issuance_time: Certificate last issuance time. + :vartype last_certificate_issuance_time: ~datetime.datetime + :ivar expiration_time: Certificate expiration time. + :vartype expiration_time: ~datetime.datetime + :ivar is_private_key_external: :code:`true` if private key is external; otherwise, + :code:`false`. + :vartype is_private_key_external: bool + :ivar app_service_certificate_not_renewable_reasons: Reasons why App Service Certificate is not + renewable at the current moment. + :vartype app_service_certificate_not_renewable_reasons: list[str or + ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem] + :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would be auto renewed next. + :vartype next_auto_renewal_time_stamp: ~datetime.datetime + :ivar contact: Contact info. + :vartype contact: ~azure.mgmt.web.v2020_12_01.models.CertificateOrderContact + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_verification_token': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'signed_certificate': {'readonly': True}, + 'intermediate': {'readonly': True}, + 'root': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'last_certificate_issuance_time': {'readonly': True}, + 'expiration_time': {'readonly': True}, + 'is_private_key_external': {'readonly': True}, + 'app_service_certificate_not_renewable_reasons': {'readonly': True}, + 'next_auto_renewal_time_stamp': {'readonly': True}, + 'contact': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'certificates': {'key': 'properties.certificates', 'type': '{AppServiceCertificate}'}, + 'distinguished_name': {'key': 'properties.distinguishedName', 'type': 'str'}, + 'domain_verification_token': {'key': 'properties.domainVerificationToken', 'type': 'str'}, + 'validity_in_years': {'key': 'properties.validityInYears', 'type': 'int'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'product_type': {'key': 'properties.productType', 'type': 'str'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'signed_certificate': {'key': 'properties.signedCertificate', 'type': 'CertificateDetails'}, + 'csr': {'key': 'properties.csr', 'type': 'str'}, + 'intermediate': {'key': 'properties.intermediate', 'type': 'CertificateDetails'}, + 'root': {'key': 'properties.root', 'type': 'CertificateDetails'}, + 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, + 'last_certificate_issuance_time': {'key': 'properties.lastCertificateIssuanceTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, + 'app_service_certificate_not_renewable_reasons': {'key': 'properties.appServiceCertificateNotRenewableReasons', 'type': '[str]'}, + 'next_auto_renewal_time_stamp': {'key': 'properties.nextAutoRenewalTimeStamp', 'type': 'iso-8601'}, + 'contact': {'key': 'properties.contact', 'type': 'CertificateOrderContact'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + certificates: Optional[Dict[str, "AppServiceCertificate"]] = None, + distinguished_name: Optional[str] = None, + validity_in_years: Optional[int] = 1, + key_size: Optional[int] = 2048, + product_type: Optional[Union[str, "CertificateProductType"]] = None, + auto_renew: Optional[bool] = True, + csr: Optional[str] = None, + **kwargs + ): + super(AppServiceCertificateOrderPatchResource, self).__init__(kind=kind, **kwargs) + self.certificates = certificates + self.distinguished_name = distinguished_name + self.domain_verification_token = None + self.validity_in_years = validity_in_years + self.key_size = key_size + self.product_type = product_type + self.auto_renew = auto_renew + self.provisioning_state = None + self.status = None + self.signed_certificate = None + self.csr = csr + self.intermediate = None + self.root = None + self.serial_number = None + self.last_certificate_issuance_time = None + self.expiration_time = None + self.is_private_key_external = None + self.app_service_certificate_not_renewable_reasons = None + self.next_auto_renewal_time_stamp = None + self.contact = None + + +class AppServiceCertificatePatchResource(ProxyOnlyResource): + """Key Vault container ARM resource for a certificate that is purchased through Azure. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param key_vault_id: Key Vault resource Id. + :type key_vault_id: str + :param key_vault_secret_name: Key Vault secret name. + :type key_vault_secret_name: str + :ivar provisioning_state: Status of the Key Vault secret. Possible values include: + "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", + "Unknown". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.KeyVaultSecretStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + key_vault_id: Optional[str] = None, + key_vault_secret_name: Optional[str] = None, + **kwargs + ): + super(AppServiceCertificatePatchResource, self).__init__(kind=kind, **kwargs) + self.key_vault_id = key_vault_id + self.key_vault_secret_name = key_vault_secret_name + self.provisioning_state = None + + +class AppServiceCertificateResource(Resource): + """Key Vault container ARM resource for a certificate that is purchased through Azure. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param key_vault_id: Key Vault resource Id. + :type key_vault_id: str + :param key_vault_secret_name: Key Vault secret name. + :type key_vault_secret_name: str + :ivar provisioning_state: Status of the Key Vault secret. Possible values include: + "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", + "Unknown". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.KeyVaultSecretStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + key_vault_id: Optional[str] = None, + key_vault_secret_name: Optional[str] = None, + **kwargs + ): + super(AppServiceCertificateResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.key_vault_id = key_vault_id + self.key_vault_secret_name = key_vault_secret_name + self.provisioning_state = None + + +class AppServiceEnvironment(msrest.serialization.Model): + """Description of an App Service Environment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar provisioning_state: Provisioning state of the App Service Environment. Possible values + include: "Succeeded", "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar status: Current status of the App Service Environment. Possible values include: + "Preparing", "Ready", "Scaling", "Deleting". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentStatus + :param virtual_network: Required. Description of the Virtual Network. + :type virtual_network: ~azure.mgmt.web.v2020_12_01.models.VirtualNetworkProfile + :param internal_load_balancing_mode: Specifies which endpoints to serve internally in the + Virtual Network for the App Service Environment. Possible values include: "None", "Web", + "Publishing", "Web, Publishing". + :type internal_load_balancing_mode: str or ~azure.mgmt.web.v2020_12_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :ivar multi_role_count: Number of front-end instances. + :vartype multi_role_count: int + :param ipssl_address_count: Number of IP SSL addresses reserved for the App Service + Environment. + :type ipssl_address_count: int + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service Environment. + :vartype maximum_number_of_machines: int + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar suspended: :code:`true` if the App Service Environment is suspended; + otherwise, :code:`false`. The environment can be suspended, e.g. when the + management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :vartype suspended: bool + :param cluster_settings: Custom settings for changing the behavior of the App Service + Environment. + :type cluster_settings: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db. + :type user_whitelisted_ip_ranges: list[str] + :ivar has_linux_workers: Flag that displays whether an ASE has linux workers or not. + :vartype has_linux_workers: bool + :ivar dedicated_host_count: Dedicated Host Count. + :vartype dedicated_host_count: int + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'virtual_network': {'required': True}, + 'multi_role_count': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'suspended': {'readonly': True}, + 'has_linux_workers': {'readonly': True}, + 'dedicated_host_count': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'virtual_network': {'key': 'virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'internalLoadBalancingMode', 'type': 'str'}, + 'multi_size': {'key': 'multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'multiRoleCount', 'type': 'int'}, + 'ipssl_address_count': {'key': 'ipsslAddressCount', 'type': 'int'}, + 'dns_suffix': {'key': 'dnsSuffix', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'maximumNumberOfMachines', 'type': 'int'}, + 'front_end_scale_factor': {'key': 'frontEndScaleFactor', 'type': 'int'}, + 'suspended': {'key': 'suspended', 'type': 'bool'}, + 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'dedicated_host_count': {'key': 'dedicatedHostCount', 'type': 'int'}, + } + + def __init__( + self, + *, + virtual_network: "VirtualNetworkProfile", + internal_load_balancing_mode: Optional[Union[str, "LoadBalancingMode"]] = None, + multi_size: Optional[str] = None, + ipssl_address_count: Optional[int] = None, + dns_suffix: Optional[str] = None, + front_end_scale_factor: Optional[int] = None, + cluster_settings: Optional[List["NameValuePair"]] = None, + user_whitelisted_ip_ranges: Optional[List[str]] = None, + **kwargs + ): + super(AppServiceEnvironment, self).__init__(**kwargs) + self.provisioning_state = None + self.status = None + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = None + self.ipssl_address_count = ipssl_address_count + self.dns_suffix = dns_suffix + self.maximum_number_of_machines = None + self.front_end_scale_factor = front_end_scale_factor + self.suspended = None + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = None + self.dedicated_host_count = None + + +class AppServiceEnvironmentCollection(msrest.serialization.Model): + """Collection of App Service Environments. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppServiceEnvironmentResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["AppServiceEnvironmentResource"], + **kwargs + ): + super(AppServiceEnvironmentCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AppServiceEnvironmentPatchResource(ProxyOnlyResource): + """ARM resource for a app service environment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: Provisioning state of the App Service Environment. Possible values + include: "Succeeded", "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar status: Current status of the App Service Environment. Possible values include: + "Preparing", "Ready", "Scaling", "Deleting". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentStatus + :param virtual_network: Description of the Virtual Network. + :type virtual_network: ~azure.mgmt.web.v2020_12_01.models.VirtualNetworkProfile + :param internal_load_balancing_mode: Specifies which endpoints to serve internally in the + Virtual Network for the App Service Environment. Possible values include: "None", "Web", + "Publishing", "Web, Publishing". + :type internal_load_balancing_mode: str or ~azure.mgmt.web.v2020_12_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :ivar multi_role_count: Number of front-end instances. + :vartype multi_role_count: int + :param ipssl_address_count: Number of IP SSL addresses reserved for the App Service + Environment. + :type ipssl_address_count: int + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service Environment. + :vartype maximum_number_of_machines: int + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar suspended: :code:`true` if the App Service Environment is suspended; + otherwise, :code:`false`. The environment can be suspended, e.g. when the + management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :vartype suspended: bool + :param cluster_settings: Custom settings for changing the behavior of the App Service + Environment. + :type cluster_settings: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db. + :type user_whitelisted_ip_ranges: list[str] + :ivar has_linux_workers: Flag that displays whether an ASE has linux workers or not. + :vartype has_linux_workers: bool + :ivar dedicated_host_count: Dedicated Host Count. + :vartype dedicated_host_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'multi_role_count': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'suspended': {'readonly': True}, + 'has_linux_workers': {'readonly': True}, + 'dedicated_host_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'str'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'properties.hasLinuxWorkers', 'type': 'bool'}, + 'dedicated_host_count': {'key': 'properties.dedicatedHostCount', 'type': 'int'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + virtual_network: Optional["VirtualNetworkProfile"] = None, + internal_load_balancing_mode: Optional[Union[str, "LoadBalancingMode"]] = None, + multi_size: Optional[str] = None, + ipssl_address_count: Optional[int] = None, + dns_suffix: Optional[str] = None, + front_end_scale_factor: Optional[int] = None, + cluster_settings: Optional[List["NameValuePair"]] = None, + user_whitelisted_ip_ranges: Optional[List[str]] = None, + **kwargs + ): + super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, **kwargs) + self.provisioning_state = None + self.status = None + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = None + self.ipssl_address_count = ipssl_address_count + self.dns_suffix = dns_suffix + self.maximum_number_of_machines = None + self.front_end_scale_factor = front_end_scale_factor + self.suspended = None + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = None + self.dedicated_host_count = None + + +class AppServiceEnvironmentResource(Resource): + """App Service Environment ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Provisioning state of the App Service Environment. Possible values + include: "Succeeded", "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar status: Current status of the App Service Environment. Possible values include: + "Preparing", "Ready", "Scaling", "Deleting". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentStatus + :param virtual_network: Description of the Virtual Network. + :type virtual_network: ~azure.mgmt.web.v2020_12_01.models.VirtualNetworkProfile + :param internal_load_balancing_mode: Specifies which endpoints to serve internally in the + Virtual Network for the App Service Environment. Possible values include: "None", "Web", + "Publishing", "Web, Publishing". + :type internal_load_balancing_mode: str or ~azure.mgmt.web.v2020_12_01.models.LoadBalancingMode + :param multi_size: Front-end VM size, e.g. "Medium", "Large". + :type multi_size: str + :ivar multi_role_count: Number of front-end instances. + :vartype multi_role_count: int + :param ipssl_address_count: Number of IP SSL addresses reserved for the App Service + Environment. + :type ipssl_address_count: int + :param dns_suffix: DNS suffix of the App Service Environment. + :type dns_suffix: str + :ivar maximum_number_of_machines: Maximum number of VMs in the App Service Environment. + :vartype maximum_number_of_machines: int + :param front_end_scale_factor: Scale factor for front-ends. + :type front_end_scale_factor: int + :ivar suspended: :code:`true` if the App Service Environment is suspended; + otherwise, :code:`false`. The environment can be suspended, e.g. when the + management endpoint is no longer available + (most likely because NSG blocked the incoming traffic). + :vartype suspended: bool + :param cluster_settings: Custom settings for changing the behavior of the App Service + Environment. + :type cluster_settings: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db. + :type user_whitelisted_ip_ranges: list[str] + :ivar has_linux_workers: Flag that displays whether an ASE has linux workers or not. + :vartype has_linux_workers: bool + :ivar dedicated_host_count: Dedicated Host Count. + :vartype dedicated_host_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'multi_role_count': {'readonly': True}, + 'maximum_number_of_machines': {'readonly': True}, + 'suspended': {'readonly': True}, + 'has_linux_workers': {'readonly': True}, + 'dedicated_host_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'VirtualNetworkProfile'}, + 'internal_load_balancing_mode': {'key': 'properties.internalLoadBalancingMode', 'type': 'str'}, + 'multi_size': {'key': 'properties.multiSize', 'type': 'str'}, + 'multi_role_count': {'key': 'properties.multiRoleCount', 'type': 'int'}, + 'ipssl_address_count': {'key': 'properties.ipsslAddressCount', 'type': 'int'}, + 'dns_suffix': {'key': 'properties.dnsSuffix', 'type': 'str'}, + 'maximum_number_of_machines': {'key': 'properties.maximumNumberOfMachines', 'type': 'int'}, + 'front_end_scale_factor': {'key': 'properties.frontEndScaleFactor', 'type': 'int'}, + 'suspended': {'key': 'properties.suspended', 'type': 'bool'}, + 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, + 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'properties.hasLinuxWorkers', 'type': 'bool'}, + 'dedicated_host_count': {'key': 'properties.dedicatedHostCount', 'type': 'int'}, + } + + def __init__( + self, + *, + location: str, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_network: Optional["VirtualNetworkProfile"] = None, + internal_load_balancing_mode: Optional[Union[str, "LoadBalancingMode"]] = None, + multi_size: Optional[str] = None, + ipssl_address_count: Optional[int] = None, + dns_suffix: Optional[str] = None, + front_end_scale_factor: Optional[int] = None, + cluster_settings: Optional[List["NameValuePair"]] = None, + user_whitelisted_ip_ranges: Optional[List[str]] = None, + **kwargs + ): + super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.status = None + self.virtual_network = virtual_network + self.internal_load_balancing_mode = internal_load_balancing_mode + self.multi_size = multi_size + self.multi_role_count = None + self.ipssl_address_count = ipssl_address_count + self.dns_suffix = dns_suffix + self.maximum_number_of_machines = None + self.front_end_scale_factor = front_end_scale_factor + self.suspended = None + self.cluster_settings = cluster_settings + self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = None + self.dedicated_host_count = None + + +class AppserviceGithubToken(msrest.serialization.Model): + """Github access token for Appservice CLI github integration. + + :param access_token: Github access token for Appservice CLI github integration. + :type access_token: str + :param scope: Scope of the github access token. + :type scope: str + :param token_type: token type. + :type token_type: str + :param got_token: True if valid github token received, False otherwise. + :type got_token: bool + :param error_message: Error message if unable to get token. + :type error_message: str + """ + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'got_token': {'key': 'gotToken', 'type': 'bool'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + access_token: Optional[str] = None, + scope: Optional[str] = None, + token_type: Optional[str] = None, + got_token: Optional[bool] = None, + error_message: Optional[str] = None, + **kwargs + ): + super(AppserviceGithubToken, self).__init__(**kwargs) + self.access_token = access_token + self.scope = scope + self.token_type = token_type + self.got_token = got_token + self.error_message = error_message + + +class AppserviceGithubTokenRequest(msrest.serialization.Model): + """Appservice Github token request content. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Code string to exchange for Github Access token. + :type code: str + :param state: Required. State string used for verification. + :type state: str + """ + + _validation = { + 'code': {'required': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + *, + code: str, + state: str, + **kwargs + ): + super(AppserviceGithubTokenRequest, self).__init__(**kwargs) + self.code = code + self.state = state + + +class AppServicePlan(Resource): + """App Service plan. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: Description of a SKU for a scalable resource. + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param worker_tier_name: Target worker tier assigned to the App Service plan. + :type worker_tier_name: str + :ivar status: App Service plan status. Possible values include: "Ready", "Pending", "Creating". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param hosting_environment_profile: Specification for the App Service Environment to use for + the App Service plan. + :type hosting_environment_profile: ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :ivar maximum_number_of_workers: Maximum number of instances that can be assigned to this App + Service plan. + :vartype maximum_number_of_workers: int + :ivar geo_region: Geographical location for the App Service plan. + :vartype geo_region: str + :param per_site_scaling: If :code:`true`, apps assigned to this App Service plan + can be scaled independently. + If :code:`false`, apps assigned to this App Service plan will scale to all + instances of the plan. + :type per_site_scaling: bool + :param maximum_elastic_worker_count: Maximum number of total workers allowed for this + ElasticScaleEnabled App Service Plan. + :type maximum_elastic_worker_count: int + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If :code:`true`, this App Service Plan owns spot instances. + :type is_spot: bool + :param spot_expiration_time: The time when the server farm expires. Valid only if it is a spot + server farm. + :type spot_expiration_time: ~datetime.datetime + :param free_offer_expiration_time: The time when the server farm free offer expires. + :type free_offer_expiration_time: ~datetime.datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan :code:`true`, + :code:`false` otherwise. + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan :code:`true`, + :code:`false` otherwise. + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan :code:`true`, + :code:`false` otherwise. + :type hyper_v: bool + :param target_worker_count: Scaling worker count. + :type target_worker_count: int + :param target_worker_size_id: Scaling worker size ID. + :type target_worker_size_id: int + :ivar provisioning_state: Provisioning state of the App Service Plan. Possible values include: + "Succeeded", "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :param kube_environment_profile: Specification for the Kubernetes Environment to use for the + App Service plan. + :type kube_environment_profile: ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'subscription': {'readonly': True}, + 'maximum_number_of_workers': {'readonly': True}, + 'geo_region': {'readonly': True}, + 'number_of_sites': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'maximum_number_of_workers': {'key': 'properties.maximumNumberOfWorkers', 'type': 'int'}, + 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, + 'per_site_scaling': {'key': 'properties.perSiteScaling', 'type': 'bool'}, + 'maximum_elastic_worker_count': {'key': 'properties.maximumElasticWorkerCount', 'type': 'int'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'free_offer_expiration_time': {'key': 'properties.freeOfferExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, + 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, + 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + } + + def __init__( + self, + *, + location: str, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["SkuDescription"] = None, + worker_tier_name: Optional[str] = None, + hosting_environment_profile: Optional["HostingEnvironmentProfile"] = None, + per_site_scaling: Optional[bool] = False, + maximum_elastic_worker_count: Optional[int] = None, + is_spot: Optional[bool] = None, + spot_expiration_time: Optional[datetime.datetime] = None, + free_offer_expiration_time: Optional[datetime.datetime] = None, + reserved: Optional[bool] = False, + is_xenon: Optional[bool] = False, + hyper_v: Optional[bool] = False, + target_worker_count: Optional[int] = None, + target_worker_size_id: Optional[int] = None, + kube_environment_profile: Optional["KubeEnvironmentProfile"] = None, + **kwargs + ): + super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.sku = sku + self.worker_tier_name = worker_tier_name + self.status = None + self.subscription = None + self.hosting_environment_profile = hosting_environment_profile + self.maximum_number_of_workers = None + self.geo_region = None + self.per_site_scaling = per_site_scaling + self.maximum_elastic_worker_count = maximum_elastic_worker_count + self.number_of_sites = None + self.is_spot = is_spot + self.spot_expiration_time = spot_expiration_time + self.free_offer_expiration_time = free_offer_expiration_time + self.resource_group = None + self.reserved = reserved + self.is_xenon = is_xenon + self.hyper_v = hyper_v + self.target_worker_count = target_worker_count + self.target_worker_size_id = target_worker_size_id + self.provisioning_state = None + self.kube_environment_profile = kube_environment_profile + + +class AppServicePlanCollection(msrest.serialization.Model): + """Collection of App Service plans. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppServicePlan]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["AppServicePlan"], + **kwargs + ): + super(AppServicePlanCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AppServicePlanPatchResource(ProxyOnlyResource): + """ARM resource for a app service plan. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param worker_tier_name: Target worker tier assigned to the App Service plan. + :type worker_tier_name: str + :ivar status: App Service plan status. Possible values include: "Ready", "Pending", "Creating". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.StatusOptions + :ivar subscription: App Service plan subscription. + :vartype subscription: str + :param hosting_environment_profile: Specification for the App Service Environment to use for + the App Service plan. + :type hosting_environment_profile: ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :ivar maximum_number_of_workers: Maximum number of instances that can be assigned to this App + Service plan. + :vartype maximum_number_of_workers: int + :ivar geo_region: Geographical location for the App Service plan. + :vartype geo_region: str + :param per_site_scaling: If :code:`true`, apps assigned to this App Service plan + can be scaled independently. + If :code:`false`, apps assigned to this App Service plan will scale to all + instances of the plan. + :type per_site_scaling: bool + :param maximum_elastic_worker_count: Maximum number of total workers allowed for this + ElasticScaleEnabled App Service Plan. + :type maximum_elastic_worker_count: int + :ivar number_of_sites: Number of apps assigned to this App Service plan. + :vartype number_of_sites: int + :param is_spot: If :code:`true`, this App Service Plan owns spot instances. + :type is_spot: bool + :param spot_expiration_time: The time when the server farm expires. Valid only if it is a spot + server farm. + :type spot_expiration_time: ~datetime.datetime + :param free_offer_expiration_time: The time when the server farm free offer expires. + :type free_offer_expiration_time: ~datetime.datetime + :ivar resource_group: Resource group of the App Service plan. + :vartype resource_group: str + :param reserved: If Linux app service plan :code:`true`, + :code:`false` otherwise. + :type reserved: bool + :param is_xenon: Obsolete: If Hyper-V container app service plan :code:`true`, + :code:`false` otherwise. + :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan :code:`true`, + :code:`false` otherwise. + :type hyper_v: bool + :param target_worker_count: Scaling worker count. + :type target_worker_count: int + :param target_worker_size_id: Scaling worker size ID. + :type target_worker_size_id: int + :ivar provisioning_state: Provisioning state of the App Service Plan. Possible values include: + "Succeeded", "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :param kube_environment_profile: Specification for the Kubernetes Environment to use for the + App Service plan. + :type kube_environment_profile: ~azure.mgmt.web.v2020_12_01.models.KubeEnvironmentProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'subscription': {'readonly': True}, + 'maximum_number_of_workers': {'readonly': True}, + 'geo_region': {'readonly': True}, + 'number_of_sites': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'maximum_number_of_workers': {'key': 'properties.maximumNumberOfWorkers', 'type': 'int'}, + 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, + 'per_site_scaling': {'key': 'properties.perSiteScaling', 'type': 'bool'}, + 'maximum_elastic_worker_count': {'key': 'properties.maximumElasticWorkerCount', 'type': 'int'}, + 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'free_offer_expiration_time': {'key': 'properties.freeOfferExpirationTime', 'type': 'iso-8601'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, + 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, + 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'kube_environment_profile': {'key': 'properties.kubeEnvironmentProfile', 'type': 'KubeEnvironmentProfile'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + worker_tier_name: Optional[str] = None, + hosting_environment_profile: Optional["HostingEnvironmentProfile"] = None, + per_site_scaling: Optional[bool] = False, + maximum_elastic_worker_count: Optional[int] = None, + is_spot: Optional[bool] = None, + spot_expiration_time: Optional[datetime.datetime] = None, + free_offer_expiration_time: Optional[datetime.datetime] = None, + reserved: Optional[bool] = False, + is_xenon: Optional[bool] = False, + hyper_v: Optional[bool] = False, + target_worker_count: Optional[int] = None, + target_worker_size_id: Optional[int] = None, + kube_environment_profile: Optional["KubeEnvironmentProfile"] = None, + **kwargs + ): + super(AppServicePlanPatchResource, self).__init__(kind=kind, **kwargs) + self.worker_tier_name = worker_tier_name + self.status = None + self.subscription = None + self.hosting_environment_profile = hosting_environment_profile + self.maximum_number_of_workers = None + self.geo_region = None + self.per_site_scaling = per_site_scaling + self.maximum_elastic_worker_count = maximum_elastic_worker_count + self.number_of_sites = None + self.is_spot = is_spot + self.spot_expiration_time = spot_expiration_time + self.free_offer_expiration_time = free_offer_expiration_time + self.resource_group = None + self.reserved = reserved + self.is_xenon = is_xenon + self.hyper_v = hyper_v + self.target_worker_count = target_worker_count + self.target_worker_size_id = target_worker_size_id + self.provisioning_state = None + self.kube_environment_profile = kube_environment_profile + + +class ArmIdWrapper(msrest.serialization.Model): + """A wrapper for an ARM resource id. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmIdWrapper, self).__init__(**kwargs) + self.id = None + + +class AseV3NetworkingConfiguration(ProxyOnlyResource): + """Full view of networking configuration for an ASE. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar windows_outbound_ip_addresses: + :vartype windows_outbound_ip_addresses: list[str] + :ivar linux_outbound_ip_addresses: + :vartype linux_outbound_ip_addresses: list[str] + :param allow_new_private_endpoint_connections: Property to enable and disable new private + endpoint connection creation on ASE. + :type allow_new_private_endpoint_connections: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'windows_outbound_ip_addresses': {'readonly': True}, + 'linux_outbound_ip_addresses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'windows_outbound_ip_addresses': {'key': 'properties.windowsOutboundIpAddresses', 'type': '[str]'}, + 'linux_outbound_ip_addresses': {'key': 'properties.linuxOutboundIpAddresses', 'type': '[str]'}, + 'allow_new_private_endpoint_connections': {'key': 'properties.allowNewPrivateEndpointConnections', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + allow_new_private_endpoint_connections: Optional[bool] = None, + **kwargs + ): + super(AseV3NetworkingConfiguration, self).__init__(kind=kind, **kwargs) + self.windows_outbound_ip_addresses = None + self.linux_outbound_ip_addresses = None + self.allow_new_private_endpoint_connections = allow_new_private_endpoint_connections + + +class AuthPlatform(ProxyOnlyResource): + """AuthPlatform. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param runtime_version: + :type runtime_version: str + :param config_file_path: + :type config_file_path: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'config_file_path': {'key': 'properties.configFilePath', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + runtime_version: Optional[str] = None, + config_file_path: Optional[str] = None, + **kwargs + ): + super(AuthPlatform, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.runtime_version = runtime_version + self.config_file_path = config_file_path + + +class AutoHealActions(msrest.serialization.Model): + """Actions which to take by the auto-heal module when a rule is triggered. + + :param action_type: Predefined action to be taken. Possible values include: "Recycle", + "LogEvent", "CustomAction". + :type action_type: str or ~azure.mgmt.web.v2020_12_01.models.AutoHealActionType + :param custom_action: Custom action to be taken. + :type custom_action: ~azure.mgmt.web.v2020_12_01.models.AutoHealCustomAction + :param min_process_execution_time: Minimum time the process must execute + before taking the action. + :type min_process_execution_time: str + """ + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'custom_action': {'key': 'customAction', 'type': 'AutoHealCustomAction'}, + 'min_process_execution_time': {'key': 'minProcessExecutionTime', 'type': 'str'}, + } + + def __init__( + self, + *, + action_type: Optional[Union[str, "AutoHealActionType"]] = None, + custom_action: Optional["AutoHealCustomAction"] = None, + min_process_execution_time: Optional[str] = None, + **kwargs + ): + super(AutoHealActions, self).__init__(**kwargs) + self.action_type = action_type + self.custom_action = custom_action + self.min_process_execution_time = min_process_execution_time + + +class AutoHealCustomAction(msrest.serialization.Model): + """Custom action to be executed +when an auto heal rule is triggered. + + :param exe: Executable to be run. + :type exe: str + :param parameters: Parameters for the executable. + :type parameters: str + """ + + _attribute_map = { + 'exe': {'key': 'exe', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + } + + def __init__( + self, + *, + exe: Optional[str] = None, + parameters: Optional[str] = None, + **kwargs + ): + super(AutoHealCustomAction, self).__init__(**kwargs) + self.exe = exe + self.parameters = parameters + + +class AutoHealRules(msrest.serialization.Model): + """Rules that can be defined for auto-heal. + + :param triggers: Conditions that describe when to execute the auto-heal actions. + :type triggers: ~azure.mgmt.web.v2020_12_01.models.AutoHealTriggers + :param actions: Actions to be executed when a rule is triggered. + :type actions: ~azure.mgmt.web.v2020_12_01.models.AutoHealActions + """ + + _attribute_map = { + 'triggers': {'key': 'triggers', 'type': 'AutoHealTriggers'}, + 'actions': {'key': 'actions', 'type': 'AutoHealActions'}, + } + + def __init__( + self, + *, + triggers: Optional["AutoHealTriggers"] = None, + actions: Optional["AutoHealActions"] = None, + **kwargs + ): + super(AutoHealRules, self).__init__(**kwargs) + self.triggers = triggers + self.actions = actions + + +class AutoHealTriggers(msrest.serialization.Model): + """Triggers for auto-heal. + + :param requests: A rule based on total requests. + :type requests: ~azure.mgmt.web.v2020_12_01.models.RequestsBasedTrigger + :param private_bytes_in_kb: A rule based on private bytes. + :type private_bytes_in_kb: int + :param status_codes: A rule based on status codes. + :type status_codes: list[~azure.mgmt.web.v2020_12_01.models.StatusCodesBasedTrigger] + :param status_codes_range: A rule based on status codes ranges. + :type status_codes_range: list[~azure.mgmt.web.v2020_12_01.models.StatusCodesRangeBasedTrigger] + :param slow_requests: A rule based on request execution time. + :type slow_requests: ~azure.mgmt.web.v2020_12_01.models.SlowRequestsBasedTrigger + :param slow_requests_with_path: A rule based on multiple Slow Requests Rule with path. + :type slow_requests_with_path: + list[~azure.mgmt.web.v2020_12_01.models.SlowRequestsBasedTrigger] + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'RequestsBasedTrigger'}, + 'private_bytes_in_kb': {'key': 'privateBytesInKB', 'type': 'int'}, + 'status_codes': {'key': 'statusCodes', 'type': '[StatusCodesBasedTrigger]'}, + 'status_codes_range': {'key': 'statusCodesRange', 'type': '[StatusCodesRangeBasedTrigger]'}, + 'slow_requests': {'key': 'slowRequests', 'type': 'SlowRequestsBasedTrigger'}, + 'slow_requests_with_path': {'key': 'slowRequestsWithPath', 'type': '[SlowRequestsBasedTrigger]'}, + } + + def __init__( + self, + *, + requests: Optional["RequestsBasedTrigger"] = None, + private_bytes_in_kb: Optional[int] = None, + status_codes: Optional[List["StatusCodesBasedTrigger"]] = None, + status_codes_range: Optional[List["StatusCodesRangeBasedTrigger"]] = None, + slow_requests: Optional["SlowRequestsBasedTrigger"] = None, + slow_requests_with_path: Optional[List["SlowRequestsBasedTrigger"]] = None, + **kwargs + ): + super(AutoHealTriggers, self).__init__(**kwargs) + self.requests = requests + self.private_bytes_in_kb = private_bytes_in_kb + self.status_codes = status_codes + self.status_codes_range = status_codes_range + self.slow_requests = slow_requests + self.slow_requests_with_path = slow_requests_with_path + + +class AzureActiveDirectory(ProxyOnlyResource): + """AzureActiveDirectory. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.AzureActiveDirectoryRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.AzureActiveDirectoryLogin + :param validation: + :type validation: ~azure.mgmt.web.v2020_12_01.models.AzureActiveDirectoryValidation + :param is_auto_provisioned: + :type is_auto_provisioned: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'AzureActiveDirectoryRegistration'}, + 'login': {'key': 'properties.login', 'type': 'AzureActiveDirectoryLogin'}, + 'validation': {'key': 'properties.validation', 'type': 'AzureActiveDirectoryValidation'}, + 'is_auto_provisioned': {'key': 'properties.isAutoProvisioned', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + registration: Optional["AzureActiveDirectoryRegistration"] = None, + login: Optional["AzureActiveDirectoryLogin"] = None, + validation: Optional["AzureActiveDirectoryValidation"] = None, + is_auto_provisioned: Optional[bool] = None, + **kwargs + ): + super(AzureActiveDirectory, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + self.validation = validation + self.is_auto_provisioned = is_auto_provisioned + + +class AzureActiveDirectoryLogin(ProxyOnlyResource): + """AzureActiveDirectoryLogin. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param disable_www_authenticate: + :type disable_www_authenticate: bool + :param login_parameters: + :type login_parameters: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'disable_www_authenticate': {'key': 'properties.disableWWWAuthenticate', 'type': 'bool'}, + 'login_parameters': {'key': 'properties.loginParameters', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + disable_www_authenticate: Optional[bool] = None, + login_parameters: Optional[List[str]] = None, + **kwargs + ): + super(AzureActiveDirectoryLogin, self).__init__(kind=kind, **kwargs) + self.disable_www_authenticate = disable_www_authenticate + self.login_parameters = login_parameters + + +class AzureActiveDirectoryRegistration(ProxyOnlyResource): + """AzureActiveDirectoryRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param open_id_issuer: + :type open_id_issuer: str + :param client_id: + :type client_id: str + :param client_secret_setting_name: + :type client_secret_setting_name: str + :param client_secret_certificate_thumbprint: + :type client_secret_certificate_thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'open_id_issuer': {'key': 'properties.openIdIssuer', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + 'client_secret_certificate_thumbprint': {'key': 'properties.clientSecretCertificateThumbprint', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + open_id_issuer: Optional[str] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + **kwargs + ): + super(AzureActiveDirectoryRegistration, self).__init__(kind=kind, **kwargs) + self.open_id_issuer = open_id_issuer + self.client_id = client_id + self.client_secret_setting_name = client_secret_setting_name + self.client_secret_certificate_thumbprint = client_secret_certificate_thumbprint + + +class AzureActiveDirectoryValidation(ProxyOnlyResource): + """AzureActiveDirectoryValidation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param jwt_claim_checks: + :type jwt_claim_checks: ~azure.mgmt.web.v2020_12_01.models.JwtClaimChecks + :param allowed_audiences: + :type allowed_audiences: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'jwt_claim_checks': {'key': 'properties.jwtClaimChecks', 'type': 'JwtClaimChecks'}, + 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + jwt_claim_checks: Optional["JwtClaimChecks"] = None, + allowed_audiences: Optional[List[str]] = None, + **kwargs + ): + super(AzureActiveDirectoryValidation, self).__init__(kind=kind, **kwargs) + self.jwt_claim_checks = jwt_claim_checks + self.allowed_audiences = allowed_audiences + + +class AzureBlobStorageApplicationLogsConfig(msrest.serialization.Model): + """Application logs azure blob storage configuration. + + :param level: Log level. Possible values include: "Off", "Verbose", "Information", "Warning", + "Error". + :type level: str or ~azure.mgmt.web.v2020_12_01.models.LogLevel + :param sas_url: SAS url to a azure blob container with read/write/list/delete permissions. + :type sas_url: str + :param retention_in_days: Retention in days. + Remove blobs older than X days. + 0 or lower means no retention. + :type retention_in_days: int + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'str'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + } + + def __init__( + self, + *, + level: Optional[Union[str, "LogLevel"]] = None, + sas_url: Optional[str] = None, + retention_in_days: Optional[int] = None, + **kwargs + ): + super(AzureBlobStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + self.sas_url = sas_url + self.retention_in_days = retention_in_days + + +class AzureBlobStorageHttpLogsConfig(msrest.serialization.Model): + """Http logs to azure blob storage configuration. + + :param sas_url: SAS url to a azure blob container with read/write/list/delete permissions. + :type sas_url: str + :param retention_in_days: Retention in days. + Remove blobs older than X days. + 0 or lower means no retention. + :type retention_in_days: int + :param enabled: True if configuration is enabled, false if it is disabled and null if + configuration is not set. + :type enabled: bool + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + sas_url: Optional[str] = None, + retention_in_days: Optional[int] = None, + enabled: Optional[bool] = None, + **kwargs + ): + super(AzureBlobStorageHttpLogsConfig, self).__init__(**kwargs) + self.sas_url = sas_url + self.retention_in_days = retention_in_days + self.enabled = enabled + + +class AzureStaticWebApps(ProxyOnlyResource): + """AzureStaticWebApps. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.AzureStaticWebAppsRegistration + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'AzureStaticWebAppsRegistration'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + registration: Optional["AzureStaticWebAppsRegistration"] = None, + **kwargs + ): + super(AzureStaticWebApps, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + + +class AzureStaticWebAppsRegistration(ProxyOnlyResource): + """AzureStaticWebAppsRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param client_id: + :type client_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + client_id: Optional[str] = None, + **kwargs + ): + super(AzureStaticWebAppsRegistration, self).__init__(kind=kind, **kwargs) + self.client_id = client_id + + +class AzureStorageInfoValue(msrest.serialization.Model): + """Azure Files or Blob Storage access information value for dictionary storage. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: Type of storage. Possible values include: "AzureFiles", "AzureBlob". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.AzureStorageType + :param account_name: Name of the storage account. + :type account_name: str + :param share_name: Name of the file share (container name, for Blob storage). + :type share_name: str + :param access_key: Access key for the storage account. + :type access_key: str + :param mount_path: Path to mount the storage within the site's runtime environment. + :type mount_path: str + :ivar state: State of the storage account. Possible values include: "Ok", "InvalidCredentials", + "InvalidShare", "NotValidated". + :vartype state: str or ~azure.mgmt.web.v2020_12_01.models.AzureStorageState + """ + + _validation = { + 'state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'access_key': {'key': 'accessKey', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "AzureStorageType"]] = None, + account_name: Optional[str] = None, + share_name: Optional[str] = None, + access_key: Optional[str] = None, + mount_path: Optional[str] = None, + **kwargs + ): + super(AzureStorageInfoValue, self).__init__(**kwargs) + self.type = type + self.account_name = account_name + self.share_name = share_name + self.access_key = access_key + self.mount_path = mount_path + self.state = None + + +class AzureStoragePropertyDictionaryResource(ProxyOnlyResource): + """AzureStorageInfo dictionary resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param properties: Azure storage accounts. + :type properties: dict[str, ~azure.mgmt.web.v2020_12_01.models.AzureStorageInfoValue] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{AzureStorageInfoValue}'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + properties: Optional[Dict[str, "AzureStorageInfoValue"]] = None, + **kwargs + ): + super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class AzureTableStorageApplicationLogsConfig(msrest.serialization.Model): + """Application logs to Azure table storage configuration. + + All required parameters must be populated in order to send to Azure. + + :param level: Log level. Possible values include: "Off", "Verbose", "Information", "Warning", + "Error". + :type level: str or ~azure.mgmt.web.v2020_12_01.models.LogLevel + :param sas_url: Required. SAS URL to an Azure table with add/query/delete permissions. + :type sas_url: str + """ + + _validation = { + 'sas_url': {'required': True}, + } + + _attribute_map = { + 'level': {'key': 'level', 'type': 'str'}, + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_url: str, + level: Optional[Union[str, "LogLevel"]] = None, + **kwargs + ): + super(AzureTableStorageApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + self.sas_url = sas_url + + +class BackupItem(ProxyOnlyResource): + """Backup description. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar backup_id: Id of the backup. + :vartype backup_id: int + :ivar storage_account_url: SAS URL for the storage account container which contains this + backup. + :vartype storage_account_url: str + :ivar blob_name: Name of the blob which contains data for this backup. + :vartype blob_name: str + :ivar name_properties_name: Name of this backup. + :vartype name_properties_name: str + :ivar status: Backup status. Possible values include: "InProgress", "Failed", "Succeeded", + "TimedOut", "Created", "Skipped", "PartiallySucceeded", "DeleteInProgress", "DeleteFailed", + "Deleted". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.BackupItemStatus + :ivar size_in_bytes: Size of the backup in bytes. + :vartype size_in_bytes: long + :ivar created: Timestamp of the backup creation. + :vartype created: ~datetime.datetime + :ivar log: Details regarding this backup. Might contain an error message. + :vartype log: str + :ivar databases: List of databases included in the backup. + :vartype databases: list[~azure.mgmt.web.v2020_12_01.models.DatabaseBackupSetting] + :ivar scheduled: True if this backup has been created due to a schedule being triggered. + :vartype scheduled: bool + :ivar last_restore_time_stamp: Timestamp of a last restore operation which used this backup. + :vartype last_restore_time_stamp: ~datetime.datetime + :ivar finished_time_stamp: Timestamp when this backup finished. + :vartype finished_time_stamp: ~datetime.datetime + :ivar correlation_id: Unique correlation identifier. Please use this along with the timestamp + while communicating with Azure support. + :vartype correlation_id: str + :ivar website_size_in_bytes: Size of the original web app which has been backed up. + :vartype website_size_in_bytes: long + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'backup_id': {'readonly': True}, + 'storage_account_url': {'readonly': True}, + 'blob_name': {'readonly': True}, + 'name_properties_name': {'readonly': True}, + 'status': {'readonly': True}, + 'size_in_bytes': {'readonly': True}, + 'created': {'readonly': True}, + 'log': {'readonly': True}, + 'databases': {'readonly': True}, + 'scheduled': {'readonly': True}, + 'last_restore_time_stamp': {'readonly': True}, + 'finished_time_stamp': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'website_size_in_bytes': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'backup_id': {'key': 'properties.id', 'type': 'int'}, + 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, + 'blob_name': {'key': 'properties.blobName', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'log': {'key': 'properties.log', 'type': 'str'}, + 'databases': {'key': 'properties.databases', 'type': '[DatabaseBackupSetting]'}, + 'scheduled': {'key': 'properties.scheduled', 'type': 'bool'}, + 'last_restore_time_stamp': {'key': 'properties.lastRestoreTimeStamp', 'type': 'iso-8601'}, + 'finished_time_stamp': {'key': 'properties.finishedTimeStamp', 'type': 'iso-8601'}, + 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, + 'website_size_in_bytes': {'key': 'properties.websiteSizeInBytes', 'type': 'long'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(BackupItem, self).__init__(kind=kind, **kwargs) + self.backup_id = None + self.storage_account_url = None + self.blob_name = None + self.name_properties_name = None + self.status = None + self.size_in_bytes = None + self.created = None + self.log = None + self.databases = None + self.scheduled = None + self.last_restore_time_stamp = None + self.finished_time_stamp = None + self.correlation_id = None + self.website_size_in_bytes = None + + +class BackupItemCollection(msrest.serialization.Model): + """Collection of backup items. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.BackupItem] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BackupItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["BackupItem"], + **kwargs + ): + super(BackupItemCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class BackupRequest(ProxyOnlyResource): + """Description of a backup which will be performed. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param backup_name: Name of the backup. + :type backup_name: str + :param enabled: True if the backup schedule is enabled (must be included in that case), false + if the backup schedule should be disabled. + :type enabled: bool + :param storage_account_url: SAS URL to the container. + :type storage_account_url: str + :param backup_schedule: Schedule for the backup if it is executed periodically. + :type backup_schedule: ~azure.mgmt.web.v2020_12_01.models.BackupSchedule + :param databases: Databases included in the backup. + :type databases: list[~azure.mgmt.web.v2020_12_01.models.DatabaseBackupSetting] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'backup_name': {'key': 'properties.backupName', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, + 'backup_schedule': {'key': 'properties.backupSchedule', 'type': 'BackupSchedule'}, + 'databases': {'key': 'properties.databases', 'type': '[DatabaseBackupSetting]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + backup_name: Optional[str] = None, + enabled: Optional[bool] = None, + storage_account_url: Optional[str] = None, + backup_schedule: Optional["BackupSchedule"] = None, + databases: Optional[List["DatabaseBackupSetting"]] = None, + **kwargs + ): + super(BackupRequest, self).__init__(kind=kind, **kwargs) + self.backup_name = backup_name + self.enabled = enabled + self.storage_account_url = storage_account_url + self.backup_schedule = backup_schedule + self.databases = databases + + +class BackupSchedule(msrest.serialization.Model): + """Description of a backup schedule. Describes how often should be the backup performed and what should be the retention policy. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param frequency_interval: Required. How often the backup should be executed (e.g. for weekly + backup, this should be set to 7 and FrequencyUnit should be set to Day). + :type frequency_interval: int + :param frequency_unit: Required. The unit of time for how often the backup should be executed + (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). + Possible values include: "Day", "Hour". Default value: "Day". + :type frequency_unit: str or ~azure.mgmt.web.v2020_12_01.models.FrequencyUnit + :param keep_at_least_one_backup: Required. True if the retention policy should always keep at + least one backup in the storage account, regardless how old it is; false otherwise. + :type keep_at_least_one_backup: bool + :param retention_period_in_days: Required. After how many days backups should be deleted. + :type retention_period_in_days: int + :param start_time: When the schedule should start working. + :type start_time: ~datetime.datetime + :ivar last_execution_time: Last time when this schedule was triggered. + :vartype last_execution_time: ~datetime.datetime + """ + + _validation = { + 'frequency_interval': {'required': True}, + 'frequency_unit': {'required': True}, + 'keep_at_least_one_backup': {'required': True}, + 'retention_period_in_days': {'required': True}, + 'last_execution_time': {'readonly': True}, + } + + _attribute_map = { + 'frequency_interval': {'key': 'frequencyInterval', 'type': 'int'}, + 'frequency_unit': {'key': 'frequencyUnit', 'type': 'str'}, + 'keep_at_least_one_backup': {'key': 'keepAtLeastOneBackup', 'type': 'bool'}, + 'retention_period_in_days': {'key': 'retentionPeriodInDays', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_execution_time': {'key': 'lastExecutionTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + frequency_interval: int = 7, + frequency_unit: Union[str, "FrequencyUnit"] = "Day", + keep_at_least_one_backup: bool = True, + retention_period_in_days: int = 30, + start_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(BackupSchedule, self).__init__(**kwargs) + self.frequency_interval = frequency_interval + self.frequency_unit = frequency_unit + self.keep_at_least_one_backup = keep_at_least_one_backup + self.retention_period_in_days = retention_period_in_days + self.start_time = start_time + self.last_execution_time = None + + +class BillingMeter(ProxyOnlyResource): + """App Service billing entity that contains information about meter which the Azure billing system utilizes to charge users for services. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param meter_id: Meter GUID onboarded in Commerce. + :type meter_id: str + :param billing_location: Azure Location of billable resource. + :type billing_location: str + :param short_name: Short Name from App Service Azure pricing Page. + :type short_name: str + :param friendly_name: Friendly name of the meter. + :type friendly_name: str + :param resource_type: App Service ResourceType meter used for. + :type resource_type: str + :param os_type: App Service OS type meter used for. + :type os_type: str + :param multiplier: Meter Multiplier. + :type multiplier: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'billing_location': {'key': 'properties.billingLocation', 'type': 'str'}, + 'short_name': {'key': 'properties.shortName', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'multiplier': {'key': 'properties.multiplier', 'type': 'float'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + meter_id: Optional[str] = None, + billing_location: Optional[str] = None, + short_name: Optional[str] = None, + friendly_name: Optional[str] = None, + resource_type: Optional[str] = None, + os_type: Optional[str] = None, + multiplier: Optional[float] = None, + **kwargs + ): + super(BillingMeter, self).__init__(kind=kind, **kwargs) + self.meter_id = meter_id + self.billing_location = billing_location + self.short_name = short_name + self.friendly_name = friendly_name + self.resource_type = resource_type + self.os_type = os_type + self.multiplier = multiplier + + +class BillingMeterCollection(msrest.serialization.Model): + """Collection of Billing Meters. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.BillingMeter] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BillingMeter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["BillingMeter"], + **kwargs + ): + super(BillingMeterCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class BlobStorageTokenStore(ProxyOnlyResource): + """BlobStorageTokenStore. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param sas_url_setting_name: + :type sas_url_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sas_url_setting_name': {'key': 'properties.sasUrlSettingName', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + sas_url_setting_name: Optional[str] = None, + **kwargs + ): + super(BlobStorageTokenStore, self).__init__(kind=kind, **kwargs) + self.sas_url_setting_name = sas_url_setting_name + + +class Capability(msrest.serialization.Model): + """Describes the capabilities/features allowed for a specific SKU. + + :param name: Name of the SKU capability. + :type name: str + :param value: Value of the SKU capability. + :type value: str + :param reason: Reason of the SKU capability. + :type reason: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + value: Optional[str] = None, + reason: Optional[str] = None, + **kwargs + ): + super(Capability, self).__init__(**kwargs) + self.name = name + self.value = value + self.reason = reason + + +class Certificate(Resource): + """SSL certificate for an app. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar friendly_name: Friendly name of the certificate. + :vartype friendly_name: str + :ivar subject_name: Subject name of the certificate. + :vartype subject_name: str + :param host_names: Host names the certificate applies to. + :type host_names: list[str] + :param pfx_blob: Pfx blob. + :type pfx_blob: bytearray + :ivar site_name: App name. + :vartype site_name: str + :ivar self_link: Self link. + :vartype self_link: str + :ivar issuer: Certificate issuer. + :vartype issuer: str + :ivar issue_date: Certificate issue Date. + :vartype issue_date: ~datetime.datetime + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: ~datetime.datetime + :param password: Certificate password. + :type password: str + :ivar thumbprint: Certificate thumbprint. + :vartype thumbprint: str + :ivar valid: Is the certificate valid?. + :vartype valid: bool + :ivar cer_blob: Raw bytes of .cer file. + :vartype cer_blob: bytearray + :ivar public_key_hash: Public key hash. + :vartype public_key_hash: str + :ivar hosting_environment_profile: Specification for the App Service Environment to use for the + certificate. + :vartype hosting_environment_profile: + ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :param key_vault_id: Key Vault Csm resource Id. + :type key_vault_id: str + :param key_vault_secret_name: Key Vault secret name. + :type key_vault_secret_name: str + :ivar key_vault_secret_status: Status of the Key Vault secret. Possible values include: + "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", + "Unknown". + :vartype key_vault_secret_status: str or + ~azure.mgmt.web.v2020_12_01.models.KeyVaultSecretStatus + :param server_farm_id: Resource ID of the associated App Service plan, formatted as: + "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + :type server_farm_id: str + :param canonical_name: CNAME of the certificate to be issued via free certificate. + :type canonical_name: str + :param domain_validation_method: Method of domain validation for free cert. + :type domain_validation_method: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'site_name': {'readonly': True}, + 'self_link': {'readonly': True}, + 'issuer': {'readonly': True}, + 'issue_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'valid': {'readonly': True}, + 'cer_blob': {'readonly': True}, + 'public_key_hash': {'readonly': True}, + 'hosting_environment_profile': {'readonly': True}, + 'key_vault_secret_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'subject_name': {'key': 'properties.subjectName', 'type': 'str'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + 'pfx_blob': {'key': 'properties.pfxBlob', 'type': 'bytearray'}, + 'site_name': {'key': 'properties.siteName', 'type': 'str'}, + 'self_link': {'key': 'properties.selfLink', 'type': 'str'}, + 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'issue_date': {'key': 'properties.issueDate', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'valid': {'key': 'properties.valid', 'type': 'bool'}, + 'cer_blob': {'key': 'properties.cerBlob', 'type': 'bytearray'}, + 'public_key_hash': {'key': 'properties.publicKeyHash', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'key_vault_secret_status': {'key': 'properties.keyVaultSecretStatus', 'type': 'str'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, + 'domain_validation_method': {'key': 'properties.domainValidationMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + host_names: Optional[List[str]] = None, + pfx_blob: Optional[bytearray] = None, + password: Optional[str] = None, + key_vault_id: Optional[str] = None, + key_vault_secret_name: Optional[str] = None, + server_farm_id: Optional[str] = None, + canonical_name: Optional[str] = None, + domain_validation_method: Optional[str] = None, + **kwargs + ): + super(Certificate, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.friendly_name = None + self.subject_name = None + self.host_names = host_names + self.pfx_blob = pfx_blob + self.site_name = None + self.self_link = None + self.issuer = None + self.issue_date = None + self.expiration_date = None + self.password = password + self.thumbprint = None + self.valid = None + self.cer_blob = None + self.public_key_hash = None + self.hosting_environment_profile = None + self.key_vault_id = key_vault_id + self.key_vault_secret_name = key_vault_secret_name + self.key_vault_secret_status = None + self.server_farm_id = server_farm_id + self.canonical_name = canonical_name + self.domain_validation_method = domain_validation_method + + +class CertificateCollection(msrest.serialization.Model): + """Collection of certificates. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Certificate] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Certificate]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Certificate"], + **kwargs + ): + super(CertificateCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class CertificateDetails(msrest.serialization.Model): + """SSL certificate details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar version: Certificate Version. + :vartype version: int + :ivar serial_number: Certificate Serial Number. + :vartype serial_number: str + :ivar thumbprint: Certificate Thumbprint. + :vartype thumbprint: str + :ivar subject: Certificate Subject. + :vartype subject: str + :ivar not_before: Date Certificate is valid from. + :vartype not_before: ~datetime.datetime + :ivar not_after: Date Certificate is valid to. + :vartype not_after: ~datetime.datetime + :ivar signature_algorithm: Certificate Signature algorithm. + :vartype signature_algorithm: str + :ivar issuer: Certificate Issuer. + :vartype issuer: str + :ivar raw_data: Raw certificate data. + :vartype raw_data: str + """ + + _validation = { + 'version': {'readonly': True}, + 'serial_number': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'subject': {'readonly': True}, + 'not_before': {'readonly': True}, + 'not_after': {'readonly': True}, + 'signature_algorithm': {'readonly': True}, + 'issuer': {'readonly': True}, + 'raw_data': {'readonly': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'int'}, + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'not_before': {'key': 'notBefore', 'type': 'iso-8601'}, + 'not_after': {'key': 'notAfter', 'type': 'iso-8601'}, + 'signature_algorithm': {'key': 'signatureAlgorithm', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'raw_data': {'key': 'rawData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CertificateDetails, self).__init__(**kwargs) + self.version = None + self.serial_number = None + self.thumbprint = None + self.subject = None + self.not_before = None + self.not_after = None + self.signature_algorithm = None + self.issuer = None + self.raw_data = None + + +class CertificateEmail(ProxyOnlyResource): + """SSL certificate email. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param email_id: Email id. + :type email_id: str + :param time_stamp: Time stamp. + :type time_stamp: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'email_id': {'key': 'properties.emailId', 'type': 'str'}, + 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + email_id: Optional[str] = None, + time_stamp: Optional[datetime.datetime] = None, + **kwargs + ): + super(CertificateEmail, self).__init__(kind=kind, **kwargs) + self.email_id = email_id + self.time_stamp = time_stamp + + +class CertificateOrderAction(ProxyOnlyResource): + """Certificate order action. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar action_type: Action type. Possible values include: "CertificateIssued", + "CertificateOrderCanceled", "CertificateOrderCreated", "CertificateRevoked", + "DomainValidationComplete", "FraudDetected", "OrgNameChange", "OrgValidationComplete", + "SanDrop", "FraudCleared", "CertificateExpired", "CertificateExpirationWarning", + "FraudDocumentationRequired", "Unknown". + :vartype action_type: str or ~azure.mgmt.web.v2020_12_01.models.CertificateOrderActionType + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'action_type': {'readonly': True}, + 'created_at': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_type': {'key': 'properties.actionType', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) + self.action_type = None + self.created_at = None + + +class CertificateOrderContact(msrest.serialization.Model): + """CertificateOrderContact. + + :param email: + :type email: str + :param name_first: + :type name_first: str + :param name_last: + :type name_last: str + :param phone: + :type phone: str + """ + + _attribute_map = { + 'email': {'key': 'email', 'type': 'str'}, + 'name_first': {'key': 'nameFirst', 'type': 'str'}, + 'name_last': {'key': 'nameLast', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + } + + def __init__( + self, + *, + email: Optional[str] = None, + name_first: Optional[str] = None, + name_last: Optional[str] = None, + phone: Optional[str] = None, + **kwargs + ): + super(CertificateOrderContact, self).__init__(**kwargs) + self.email = email + self.name_first = name_first + self.name_last = name_last + self.phone = phone + + +class CertificatePatchResource(ProxyOnlyResource): + """ARM resource for a certificate. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar friendly_name: Friendly name of the certificate. + :vartype friendly_name: str + :ivar subject_name: Subject name of the certificate. + :vartype subject_name: str + :param host_names: Host names the certificate applies to. + :type host_names: list[str] + :param pfx_blob: Pfx blob. + :type pfx_blob: bytearray + :ivar site_name: App name. + :vartype site_name: str + :ivar self_link: Self link. + :vartype self_link: str + :ivar issuer: Certificate issuer. + :vartype issuer: str + :ivar issue_date: Certificate issue Date. + :vartype issue_date: ~datetime.datetime + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: ~datetime.datetime + :param password: Certificate password. + :type password: str + :ivar thumbprint: Certificate thumbprint. + :vartype thumbprint: str + :ivar valid: Is the certificate valid?. + :vartype valid: bool + :ivar cer_blob: Raw bytes of .cer file. + :vartype cer_blob: bytearray + :ivar public_key_hash: Public key hash. + :vartype public_key_hash: str + :ivar hosting_environment_profile: Specification for the App Service Environment to use for the + certificate. + :vartype hosting_environment_profile: + ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :param key_vault_id: Key Vault Csm resource Id. + :type key_vault_id: str + :param key_vault_secret_name: Key Vault secret name. + :type key_vault_secret_name: str + :ivar key_vault_secret_status: Status of the Key Vault secret. Possible values include: + "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", + "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", + "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", + "Unknown". + :vartype key_vault_secret_status: str or + ~azure.mgmt.web.v2020_12_01.models.KeyVaultSecretStatus + :param server_farm_id: Resource ID of the associated App Service plan, formatted as: + "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + :type server_farm_id: str + :param canonical_name: CNAME of the certificate to be issued via free certificate. + :type canonical_name: str + :param domain_validation_method: Method of domain validation for free cert. + :type domain_validation_method: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'site_name': {'readonly': True}, + 'self_link': {'readonly': True}, + 'issuer': {'readonly': True}, + 'issue_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'valid': {'readonly': True}, + 'cer_blob': {'readonly': True}, + 'public_key_hash': {'readonly': True}, + 'hosting_environment_profile': {'readonly': True}, + 'key_vault_secret_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'subject_name': {'key': 'properties.subjectName', 'type': 'str'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + 'pfx_blob': {'key': 'properties.pfxBlob', 'type': 'bytearray'}, + 'site_name': {'key': 'properties.siteName', 'type': 'str'}, + 'self_link': {'key': 'properties.selfLink', 'type': 'str'}, + 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'issue_date': {'key': 'properties.issueDate', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'valid': {'key': 'properties.valid', 'type': 'bool'}, + 'cer_blob': {'key': 'properties.cerBlob', 'type': 'bytearray'}, + 'public_key_hash': {'key': 'properties.publicKeyHash', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, + 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, + 'key_vault_secret_status': {'key': 'properties.keyVaultSecretStatus', 'type': 'str'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'canonical_name': {'key': 'properties.canonicalName', 'type': 'str'}, + 'domain_validation_method': {'key': 'properties.domainValidationMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + host_names: Optional[List[str]] = None, + pfx_blob: Optional[bytearray] = None, + password: Optional[str] = None, + key_vault_id: Optional[str] = None, + key_vault_secret_name: Optional[str] = None, + server_farm_id: Optional[str] = None, + canonical_name: Optional[str] = None, + domain_validation_method: Optional[str] = None, + **kwargs + ): + super(CertificatePatchResource, self).__init__(kind=kind, **kwargs) + self.friendly_name = None + self.subject_name = None + self.host_names = host_names + self.pfx_blob = pfx_blob + self.site_name = None + self.self_link = None + self.issuer = None + self.issue_date = None + self.expiration_date = None + self.password = password + self.thumbprint = None + self.valid = None + self.cer_blob = None + self.public_key_hash = None + self.hosting_environment_profile = None + self.key_vault_id = key_vault_id + self.key_vault_secret_name = key_vault_secret_name + self.key_vault_secret_status = None + self.server_farm_id = server_farm_id + self.canonical_name = canonical_name + self.domain_validation_method = domain_validation_method + + +class ClientRegistration(ProxyOnlyResource): + """ClientRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param client_id: + :type client_id: str + :param client_secret_setting_name: + :type client_secret_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + **kwargs + ): + super(ClientRegistration, self).__init__(kind=kind, **kwargs) + self.client_id = client_id + self.client_secret_setting_name = client_secret_setting_name + + +class CloningInfo(msrest.serialization.Model): + """Information needed for cloning operation. + + All required parameters must be populated in order to send to Azure. + + :param correlation_id: Correlation ID of cloning operation. This ID ties multiple cloning + operations + together to use the same snapshot. + :type correlation_id: str + :param overwrite: :code:`true` to overwrite destination app; otherwise, + :code:`false`. + :type overwrite: bool + :param clone_custom_host_names: :code:`true` to clone custom hostnames from source + app; otherwise, :code:`false`. + :type clone_custom_host_names: bool + :param clone_source_control: :code:`true` to clone source control from source app; + otherwise, :code:`false`. + :type clone_source_control: bool + :param source_web_app_id: Required. ARM resource ID of the source app. App resource ID is of + the form + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + for production slots and + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + for other slots. + :type source_web_app_id: str + :param source_web_app_location: Location of source app ex: West US or North Europe. + :type source_web_app_location: str + :param hosting_environment: App Service Environment. + :type hosting_environment: str + :param app_settings_overrides: Application setting overrides for cloned app. If specified, + these settings override the settings cloned + from source app. Otherwise, application settings from source app are retained. + :type app_settings_overrides: dict[str, str] + :param configure_load_balancing: :code:`true` to configure load balancing for + source and destination app. + :type configure_load_balancing: bool + :param traffic_manager_profile_id: ARM resource ID of the Traffic Manager profile to use, if it + exists. Traffic Manager resource ID is of the form + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}. + :type traffic_manager_profile_id: str + :param traffic_manager_profile_name: Name of Traffic Manager profile to create. This is only + needed if Traffic Manager profile does not already exist. + :type traffic_manager_profile_name: str + """ + + _validation = { + 'source_web_app_id': {'required': True}, + } + + _attribute_map = { + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'overwrite': {'key': 'overwrite', 'type': 'bool'}, + 'clone_custom_host_names': {'key': 'cloneCustomHostNames', 'type': 'bool'}, + 'clone_source_control': {'key': 'cloneSourceControl', 'type': 'bool'}, + 'source_web_app_id': {'key': 'sourceWebAppId', 'type': 'str'}, + 'source_web_app_location': {'key': 'sourceWebAppLocation', 'type': 'str'}, + 'hosting_environment': {'key': 'hostingEnvironment', 'type': 'str'}, + 'app_settings_overrides': {'key': 'appSettingsOverrides', 'type': '{str}'}, + 'configure_load_balancing': {'key': 'configureLoadBalancing', 'type': 'bool'}, + 'traffic_manager_profile_id': {'key': 'trafficManagerProfileId', 'type': 'str'}, + 'traffic_manager_profile_name': {'key': 'trafficManagerProfileName', 'type': 'str'}, + } + + def __init__( + self, + *, + source_web_app_id: str, + correlation_id: Optional[str] = None, + overwrite: Optional[bool] = None, + clone_custom_host_names: Optional[bool] = None, + clone_source_control: Optional[bool] = None, + source_web_app_location: Optional[str] = None, + hosting_environment: Optional[str] = None, + app_settings_overrides: Optional[Dict[str, str]] = None, + configure_load_balancing: Optional[bool] = None, + traffic_manager_profile_id: Optional[str] = None, + traffic_manager_profile_name: Optional[str] = None, + **kwargs + ): + super(CloningInfo, self).__init__(**kwargs) + self.correlation_id = correlation_id + self.overwrite = overwrite + self.clone_custom_host_names = clone_custom_host_names + self.clone_source_control = clone_source_control + self.source_web_app_id = source_web_app_id + self.source_web_app_location = source_web_app_location + self.hosting_environment = hosting_environment + self.app_settings_overrides = app_settings_overrides + self.configure_load_balancing = configure_load_balancing + self.traffic_manager_profile_id = traffic_manager_profile_id + self.traffic_manager_profile_name = traffic_manager_profile_name + + +class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: Principal Id of user assigned identity. + :vartype principal_id: str + :ivar client_id: Client Id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class ConnectionStringDictionary(ProxyOnlyResource): + """String dictionary resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param properties: Connection strings. + :type properties: dict[str, ~azure.mgmt.web.v2020_12_01.models.ConnStringValueTypePair] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{ConnStringValueTypePair}'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + properties: Optional[Dict[str, "ConnStringValueTypePair"]] = None, + **kwargs + ): + super(ConnectionStringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class ConnStringInfo(msrest.serialization.Model): + """Database connection string information. + + :param name: Name of connection string. + :type name: str + :param connection_string: Connection string value. + :type connection_string: str + :param type: Type of database. Possible values include: "MySql", "SQLServer", "SQLAzure", + "Custom", "NotificationHub", "ServiceBus", "EventHub", "ApiHub", "DocDb", "RedisCache", + "PostgreSQL". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.ConnectionStringType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + connection_string: Optional[str] = None, + type: Optional[Union[str, "ConnectionStringType"]] = None, + **kwargs + ): + super(ConnStringInfo, self).__init__(**kwargs) + self.name = name + self.connection_string = connection_string + self.type = type + + +class ConnStringValueTypePair(msrest.serialization.Model): + """Database connection string value to type pair. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Value of pair. + :type value: str + :param type: Required. Type of database. Possible values include: "MySql", "SQLServer", + "SQLAzure", "Custom", "NotificationHub", "ServiceBus", "EventHub", "ApiHub", "DocDb", + "RedisCache", "PostgreSQL". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.ConnectionStringType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + value: str, + type: Union[str, "ConnectionStringType"], + **kwargs + ): + super(ConnStringValueTypePair, self).__init__(**kwargs) + self.value = value + self.type = type + + +class Contact(msrest.serialization.Model): + """Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois +directories as per ICANN requirements. + + All required parameters must be populated in order to send to Azure. + + :param address_mailing: Mailing address. + :type address_mailing: ~azure.mgmt.web.v2020_12_01.models.Address + :param email: Required. Email address. + :type email: str + :param fax: Fax number. + :type fax: str + :param job_title: Job title. + :type job_title: str + :param name_first: Required. First name. + :type name_first: str + :param name_last: Required. Last name. + :type name_last: str + :param name_middle: Middle name. + :type name_middle: str + :param organization: Organization contact belongs to. + :type organization: str + :param phone: Required. Phone number. + :type phone: str + """ + + _validation = { + 'email': {'required': True}, + 'name_first': {'required': True}, + 'name_last': {'required': True}, + 'phone': {'required': True}, + } + + _attribute_map = { + 'address_mailing': {'key': 'addressMailing', 'type': 'Address'}, + 'email': {'key': 'email', 'type': 'str'}, + 'fax': {'key': 'fax', 'type': 'str'}, + 'job_title': {'key': 'jobTitle', 'type': 'str'}, + 'name_first': {'key': 'nameFirst', 'type': 'str'}, + 'name_last': {'key': 'nameLast', 'type': 'str'}, + 'name_middle': {'key': 'nameMiddle', 'type': 'str'}, + 'organization': {'key': 'organization', 'type': 'str'}, + 'phone': {'key': 'phone', 'type': 'str'}, + } + + def __init__( + self, + *, + email: str, + name_first: str, + name_last: str, + phone: str, + address_mailing: Optional["Address"] = None, + fax: Optional[str] = None, + job_title: Optional[str] = None, + name_middle: Optional[str] = None, + organization: Optional[str] = None, + **kwargs + ): + super(Contact, self).__init__(**kwargs) + self.address_mailing = address_mailing + self.email = email + self.fax = fax + self.job_title = job_title + self.name_first = name_first + self.name_last = name_last + self.name_middle = name_middle + self.organization = organization + self.phone = phone + + +class ContainerCpuStatistics(msrest.serialization.Model): + """ContainerCpuStatistics. + + :param cpu_usage: + :type cpu_usage: ~azure.mgmt.web.v2020_12_01.models.ContainerCpuUsage + :param system_cpu_usage: + :type system_cpu_usage: long + :param online_cpu_count: + :type online_cpu_count: int + :param throttling_data: + :type throttling_data: ~azure.mgmt.web.v2020_12_01.models.ContainerThrottlingData + """ + + _attribute_map = { + 'cpu_usage': {'key': 'cpuUsage', 'type': 'ContainerCpuUsage'}, + 'system_cpu_usage': {'key': 'systemCpuUsage', 'type': 'long'}, + 'online_cpu_count': {'key': 'onlineCpuCount', 'type': 'int'}, + 'throttling_data': {'key': 'throttlingData', 'type': 'ContainerThrottlingData'}, + } + + def __init__( + self, + *, + cpu_usage: Optional["ContainerCpuUsage"] = None, + system_cpu_usage: Optional[int] = None, + online_cpu_count: Optional[int] = None, + throttling_data: Optional["ContainerThrottlingData"] = None, + **kwargs + ): + super(ContainerCpuStatistics, self).__init__(**kwargs) + self.cpu_usage = cpu_usage + self.system_cpu_usage = system_cpu_usage + self.online_cpu_count = online_cpu_count + self.throttling_data = throttling_data + + +class ContainerCpuUsage(msrest.serialization.Model): + """ContainerCpuUsage. + + :param total_usage: + :type total_usage: long + :param per_cpu_usage: + :type per_cpu_usage: list[long] + :param kernel_mode_usage: + :type kernel_mode_usage: long + :param user_mode_usage: + :type user_mode_usage: long + """ + + _attribute_map = { + 'total_usage': {'key': 'totalUsage', 'type': 'long'}, + 'per_cpu_usage': {'key': 'perCpuUsage', 'type': '[long]'}, + 'kernel_mode_usage': {'key': 'kernelModeUsage', 'type': 'long'}, + 'user_mode_usage': {'key': 'userModeUsage', 'type': 'long'}, + } + + def __init__( + self, + *, + total_usage: Optional[int] = None, + per_cpu_usage: Optional[List[int]] = None, + kernel_mode_usage: Optional[int] = None, + user_mode_usage: Optional[int] = None, + **kwargs + ): + super(ContainerCpuUsage, self).__init__(**kwargs) + self.total_usage = total_usage + self.per_cpu_usage = per_cpu_usage + self.kernel_mode_usage = kernel_mode_usage + self.user_mode_usage = user_mode_usage + + +class ContainerInfo(msrest.serialization.Model): + """ContainerInfo. + + :param current_time_stamp: + :type current_time_stamp: ~datetime.datetime + :param previous_time_stamp: + :type previous_time_stamp: ~datetime.datetime + :param current_cpu_stats: + :type current_cpu_stats: ~azure.mgmt.web.v2020_12_01.models.ContainerCpuStatistics + :param previous_cpu_stats: + :type previous_cpu_stats: ~azure.mgmt.web.v2020_12_01.models.ContainerCpuStatistics + :param memory_stats: + :type memory_stats: ~azure.mgmt.web.v2020_12_01.models.ContainerMemoryStatistics + :param name: + :type name: str + :param id: + :type id: str + :param eth0: + :type eth0: ~azure.mgmt.web.v2020_12_01.models.ContainerNetworkInterfaceStatistics + """ + + _attribute_map = { + 'current_time_stamp': {'key': 'currentTimeStamp', 'type': 'iso-8601'}, + 'previous_time_stamp': {'key': 'previousTimeStamp', 'type': 'iso-8601'}, + 'current_cpu_stats': {'key': 'currentCpuStats', 'type': 'ContainerCpuStatistics'}, + 'previous_cpu_stats': {'key': 'previousCpuStats', 'type': 'ContainerCpuStatistics'}, + 'memory_stats': {'key': 'memoryStats', 'type': 'ContainerMemoryStatistics'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'eth0': {'key': 'eth0', 'type': 'ContainerNetworkInterfaceStatistics'}, + } + + def __init__( + self, + *, + current_time_stamp: Optional[datetime.datetime] = None, + previous_time_stamp: Optional[datetime.datetime] = None, + current_cpu_stats: Optional["ContainerCpuStatistics"] = None, + previous_cpu_stats: Optional["ContainerCpuStatistics"] = None, + memory_stats: Optional["ContainerMemoryStatistics"] = None, + name: Optional[str] = None, + id: Optional[str] = None, + eth0: Optional["ContainerNetworkInterfaceStatistics"] = None, + **kwargs + ): + super(ContainerInfo, self).__init__(**kwargs) + self.current_time_stamp = current_time_stamp + self.previous_time_stamp = previous_time_stamp + self.current_cpu_stats = current_cpu_stats + self.previous_cpu_stats = previous_cpu_stats + self.memory_stats = memory_stats + self.name = name + self.id = id + self.eth0 = eth0 + + +class ContainerMemoryStatistics(msrest.serialization.Model): + """ContainerMemoryStatistics. + + :param usage: + :type usage: long + :param max_usage: + :type max_usage: long + :param limit: + :type limit: long + """ + + _attribute_map = { + 'usage': {'key': 'usage', 'type': 'long'}, + 'max_usage': {'key': 'maxUsage', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + } + + def __init__( + self, + *, + usage: Optional[int] = None, + max_usage: Optional[int] = None, + limit: Optional[int] = None, + **kwargs + ): + super(ContainerMemoryStatistics, self).__init__(**kwargs) + self.usage = usage + self.max_usage = max_usage + self.limit = limit + + +class ContainerNetworkInterfaceStatistics(msrest.serialization.Model): + """ContainerNetworkInterfaceStatistics. + + :param rx_bytes: + :type rx_bytes: long + :param rx_packets: + :type rx_packets: long + :param rx_errors: + :type rx_errors: long + :param rx_dropped: + :type rx_dropped: long + :param tx_bytes: + :type tx_bytes: long + :param tx_packets: + :type tx_packets: long + :param tx_errors: + :type tx_errors: long + :param tx_dropped: + :type tx_dropped: long + """ + + _attribute_map = { + 'rx_bytes': {'key': 'rxBytes', 'type': 'long'}, + 'rx_packets': {'key': 'rxPackets', 'type': 'long'}, + 'rx_errors': {'key': 'rxErrors', 'type': 'long'}, + 'rx_dropped': {'key': 'rxDropped', 'type': 'long'}, + 'tx_bytes': {'key': 'txBytes', 'type': 'long'}, + 'tx_packets': {'key': 'txPackets', 'type': 'long'}, + 'tx_errors': {'key': 'txErrors', 'type': 'long'}, + 'tx_dropped': {'key': 'txDropped', 'type': 'long'}, + } + + def __init__( + self, + *, + rx_bytes: Optional[int] = None, + rx_packets: Optional[int] = None, + rx_errors: Optional[int] = None, + rx_dropped: Optional[int] = None, + tx_bytes: Optional[int] = None, + tx_packets: Optional[int] = None, + tx_errors: Optional[int] = None, + tx_dropped: Optional[int] = None, + **kwargs + ): + super(ContainerNetworkInterfaceStatistics, self).__init__(**kwargs) + self.rx_bytes = rx_bytes + self.rx_packets = rx_packets + self.rx_errors = rx_errors + self.rx_dropped = rx_dropped + self.tx_bytes = tx_bytes + self.tx_packets = tx_packets + self.tx_errors = tx_errors + self.tx_dropped = tx_dropped + + +class ContainerThrottlingData(msrest.serialization.Model): + """ContainerThrottlingData. + + :param periods: + :type periods: int + :param throttled_periods: + :type throttled_periods: int + :param throttled_time: + :type throttled_time: int + """ + + _attribute_map = { + 'periods': {'key': 'periods', 'type': 'int'}, + 'throttled_periods': {'key': 'throttledPeriods', 'type': 'int'}, + 'throttled_time': {'key': 'throttledTime', 'type': 'int'}, + } + + def __init__( + self, + *, + periods: Optional[int] = None, + throttled_periods: Optional[int] = None, + throttled_time: Optional[int] = None, + **kwargs + ): + super(ContainerThrottlingData, self).__init__(**kwargs) + self.periods = periods + self.throttled_periods = throttled_periods + self.throttled_time = throttled_time + + +class ContinuousWebJob(ProxyOnlyResource): + """Continuous Web Job Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param status: Job status. Possible values include: "Initializing", "Starting", "Running", + "PendingRestart", "Stopped". + :type status: str or ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobStatus + :param detailed_status: Detailed status. + :type detailed_status: str + :param log_url: Log URL. + :type log_url: str + :param run_command: Run command. + :type run_command: str + :param url: Job URL. + :type url: str + :param extra_info_url: Extra Info URL. + :type extra_info_url: str + :param web_job_type: Job type. Possible values include: "Continuous", "Triggered". + :type web_job_type: str or ~azure.mgmt.web.v2020_12_01.models.WebJobType + :param error: Error information. + :type error: str + :param using_sdk: Using SDK?. + :type using_sdk: bool + :param settings: Job settings. + :type settings: dict[str, object] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'detailed_status': {'key': 'properties.detailed_status', 'type': 'str'}, + 'log_url': {'key': 'properties.log_url', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + status: Optional[Union[str, "ContinuousWebJobStatus"]] = None, + detailed_status: Optional[str] = None, + log_url: Optional[str] = None, + run_command: Optional[str] = None, + url: Optional[str] = None, + extra_info_url: Optional[str] = None, + web_job_type: Optional[Union[str, "WebJobType"]] = None, + error: Optional[str] = None, + using_sdk: Optional[bool] = None, + settings: Optional[Dict[str, object]] = None, + **kwargs + ): + super(ContinuousWebJob, self).__init__(kind=kind, **kwargs) + self.status = status + self.detailed_status = detailed_status + self.log_url = log_url + self.run_command = run_command + self.url = url + self.extra_info_url = extra_info_url + self.web_job_type = web_job_type + self.error = error + self.using_sdk = using_sdk + self.settings = settings + + +class ContinuousWebJobCollection(msrest.serialization.Model): + """Collection of Kudu continuous web job information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ContinuousWebJob]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["ContinuousWebJob"], + **kwargs + ): + super(ContinuousWebJobCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class CookieExpiration(ProxyOnlyResource): + """CookieExpiration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param convention: Possible values include: "FixedTime", "IdentityProviderDerived". + :type convention: str or ~azure.mgmt.web.v2020_12_01.models.CookieExpirationConvention + :param time_to_expiration: + :type time_to_expiration: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'convention': {'key': 'properties.convention', 'type': 'str'}, + 'time_to_expiration': {'key': 'properties.timeToExpiration', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + convention: Optional[Union[str, "CookieExpirationConvention"]] = None, + time_to_expiration: Optional[str] = None, + **kwargs + ): + super(CookieExpiration, self).__init__(kind=kind, **kwargs) + self.convention = convention + self.time_to_expiration = time_to_expiration + + +class CorsSettings(msrest.serialization.Model): + """Cross-Origin Resource Sharing (CORS) settings for the app. + + :param allowed_origins: Gets or sets the list of origins that should be allowed to make + cross-origin + calls (for example: http://example.com:12345). Use "*" to allow all. + :type allowed_origins: list[str] + :param support_credentials: Gets or sets whether CORS requests with credentials are allowed. + See + https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials + for more details. + :type support_credentials: bool + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + 'support_credentials': {'key': 'supportCredentials', 'type': 'bool'}, + } + + def __init__( + self, + *, + allowed_origins: Optional[List[str]] = None, + support_credentials: Optional[bool] = None, + **kwargs + ): + super(CorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.support_credentials = support_credentials + + +class CsmMoveResourceEnvelope(msrest.serialization.Model): + """Object with a list of the resources that need to be moved and the resource group they should be moved to. + + :param target_resource_group: + :type target_resource_group: str + :param resources: + :type resources: list[str] + """ + + _validation = { + 'target_resource_group': {'max_length': 90, 'min_length': 1, 'pattern': r' ^[-\w\._\(\)]+[^\.]$'}, + } + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + } + + def __init__( + self, + *, + target_resource_group: Optional[str] = None, + resources: Optional[List[str]] = None, + **kwargs + ): + super(CsmMoveResourceEnvelope, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources + + +class CsmOperationCollection(msrest.serialization.Model): + """Collection of Azure resource manager operation metadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.CsmOperationDescription] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CsmOperationDescription]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["CsmOperationDescription"], + **kwargs + ): + super(CsmOperationCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class CsmOperationDescription(msrest.serialization.Model): + """Description of an operation available for Microsoft.Web resource provider. + + :param name: + :type name: str + :param display: Meta data about operation used for display in portal. + :type display: ~azure.mgmt.web.v2020_12_01.models.CsmOperationDisplay + :param origin: + :type origin: str + :param properties: Properties available for a Microsoft.Web resource provider operation. + :type properties: ~azure.mgmt.web.v2020_12_01.models.CsmOperationDescriptionProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'CsmOperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CsmOperationDescriptionProperties'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["CsmOperationDisplay"] = None, + origin: Optional[str] = None, + properties: Optional["CsmOperationDescriptionProperties"] = None, + **kwargs + ): + super(CsmOperationDescription, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class CsmOperationDescriptionProperties(msrest.serialization.Model): + """Properties available for a Microsoft.Web resource provider operation. + + :param service_specification: Resource metrics service provided by Microsoft.Insights resource + provider. + :type service_specification: ~azure.mgmt.web.v2020_12_01.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__( + self, + *, + service_specification: Optional["ServiceSpecification"] = None, + **kwargs + ): + super(CsmOperationDescriptionProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class CsmOperationDisplay(msrest.serialization.Model): + """Meta data about operation used for display in portal. + + :param provider: + :type provider: str + :param resource: + :type resource: str + :param operation: + :type operation: str + :param description: + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(CsmOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class CsmPublishingCredentialsPoliciesCollection(ProxyOnlyResource): + """Publishing Credentials Policies collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param ftp: Whether FTP is allowed. + :type ftp: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :param scm: Whether Scm Basic Auth is allowed. + :type scm: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ftp': {'key': 'properties.ftp', 'type': 'CsmPublishingCredentialsPoliciesEntity'}, + 'scm': {'key': 'properties.scm', 'type': 'CsmPublishingCredentialsPoliciesEntity'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + ftp: Optional["CsmPublishingCredentialsPoliciesEntity"] = None, + scm: Optional["CsmPublishingCredentialsPoliciesEntity"] = None, + **kwargs + ): + super(CsmPublishingCredentialsPoliciesCollection, self).__init__(kind=kind, **kwargs) + self.ftp = ftp + self.scm = scm + + +class CsmPublishingCredentialsPoliciesEntity(ProxyOnlyResource): + """Publishing Credentials Policies parameters. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param allow: :code:`true` to allow access to a publishing method; otherwise, + :code:`false`. + :type allow: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allow': {'key': 'properties.allow', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + allow: Optional[bool] = None, + **kwargs + ): + super(CsmPublishingCredentialsPoliciesEntity, self).__init__(kind=kind, **kwargs) + self.allow = allow + + +class CsmPublishingProfileOptions(msrest.serialization.Model): + """Publishing options for requested profile. + + :param format: Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: "FileZilla3", "WebDeploy", "Ftp". + :type format: str or ~azure.mgmt.web.v2020_12_01.models.PublishingProfileFormat + :param include_disaster_recovery_endpoints: Include the DisasterRecover endpoint if true. + :type include_disaster_recovery_endpoints: bool + """ + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + 'include_disaster_recovery_endpoints': {'key': 'includeDisasterRecoveryEndpoints', 'type': 'bool'}, + } + + def __init__( + self, + *, + format: Optional[Union[str, "PublishingProfileFormat"]] = None, + include_disaster_recovery_endpoints: Optional[bool] = None, + **kwargs + ): + super(CsmPublishingProfileOptions, self).__init__(**kwargs) + self.format = format + self.include_disaster_recovery_endpoints = include_disaster_recovery_endpoints + + +class CsmSlotEntity(msrest.serialization.Model): + """Deployment slot parameters. + + All required parameters must be populated in order to send to Azure. + + :param target_slot: Required. Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: Required. :code:`true` to preserve Virtual Network to the + slot during swap; otherwise, :code:`false`. + :type preserve_vnet: bool + """ + + _validation = { + 'target_slot': {'required': True}, + 'preserve_vnet': {'required': True}, + } + + _attribute_map = { + 'target_slot': {'key': 'targetSlot', 'type': 'str'}, + 'preserve_vnet': {'key': 'preserveVnet', 'type': 'bool'}, + } + + def __init__( + self, + *, + target_slot: str, + preserve_vnet: bool, + **kwargs + ): + super(CsmSlotEntity, self).__init__(**kwargs) + self.target_slot = target_slot + self.preserve_vnet = preserve_vnet + + +class CsmUsageQuota(msrest.serialization.Model): + """Usage of the quota resource. + + :param unit: Units of measurement for the quota resource. + :type unit: str + :param next_reset_time: Next reset time for the resource counter. + :type next_reset_time: ~datetime.datetime + :param current_value: The current value of the resource counter. + :type current_value: long + :param limit: The resource limit. + :type limit: long + :param name: Quota name. + :type name: ~azure.mgmt.web.v2020_12_01.models.LocalizableString + """ + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + } + + def __init__( + self, + *, + unit: Optional[str] = None, + next_reset_time: Optional[datetime.datetime] = None, + current_value: Optional[int] = None, + limit: Optional[int] = None, + name: Optional["LocalizableString"] = None, + **kwargs + ): + super(CsmUsageQuota, self).__init__(**kwargs) + self.unit = unit + self.next_reset_time = next_reset_time + self.current_value = current_value + self.limit = limit + self.name = name + + +class CsmUsageQuotaCollection(msrest.serialization.Model): + """Collection of CSM usage quotas. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuota] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CsmUsageQuota]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["CsmUsageQuota"], + **kwargs + ): + super(CsmUsageQuotaCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class CustomHostnameAnalysisResult(ProxyOnlyResource): + """Custom domain analysis. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar is_hostname_already_verified: :code:`true` if hostname is already verified; + otherwise, :code:`false`. + :vartype is_hostname_already_verified: bool + :ivar custom_domain_verification_test: DNS verification test result. Possible values include: + "Passed", "Failed", "Skipped". + :vartype custom_domain_verification_test: str or + ~azure.mgmt.web.v2020_12_01.models.DnsVerificationTestResult + :ivar custom_domain_verification_failure_info: Raw failure information if DNS verification + fails. + :vartype custom_domain_verification_failure_info: + ~azure.mgmt.web.v2020_12_01.models.ErrorEntity + :ivar has_conflict_on_scale_unit: :code:`true` if there is a conflict on a scale + unit; otherwise, :code:`false`. + :vartype has_conflict_on_scale_unit: bool + :ivar has_conflict_across_subscription: :code:`true` if there is a conflict across + subscriptions; otherwise, :code:`false`. + :vartype has_conflict_across_subscription: bool + :ivar conflicting_app_resource_id: Name of the conflicting app on scale unit if it's within the + same subscription. + :vartype conflicting_app_resource_id: str + :param c_name_records: CName records controller can see for this hostname. + :type c_name_records: list[str] + :param txt_records: TXT records controller can see for this hostname. + :type txt_records: list[str] + :param a_records: A records controller can see for this hostname. + :type a_records: list[str] + :param alternate_c_name_records: Alternate CName records controller can see for this hostname. + :type alternate_c_name_records: list[str] + :param alternate_txt_records: Alternate TXT records controller can see for this hostname. + :type alternate_txt_records: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'is_hostname_already_verified': {'readonly': True}, + 'custom_domain_verification_test': {'readonly': True}, + 'custom_domain_verification_failure_info': {'readonly': True}, + 'has_conflict_on_scale_unit': {'readonly': True}, + 'has_conflict_across_subscription': {'readonly': True}, + 'conflicting_app_resource_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_hostname_already_verified': {'key': 'properties.isHostnameAlreadyVerified', 'type': 'bool'}, + 'custom_domain_verification_test': {'key': 'properties.customDomainVerificationTest', 'type': 'str'}, + 'custom_domain_verification_failure_info': {'key': 'properties.customDomainVerificationFailureInfo', 'type': 'ErrorEntity'}, + 'has_conflict_on_scale_unit': {'key': 'properties.hasConflictOnScaleUnit', 'type': 'bool'}, + 'has_conflict_across_subscription': {'key': 'properties.hasConflictAcrossSubscription', 'type': 'bool'}, + 'conflicting_app_resource_id': {'key': 'properties.conflictingAppResourceId', 'type': 'str'}, + 'c_name_records': {'key': 'properties.cNameRecords', 'type': '[str]'}, + 'txt_records': {'key': 'properties.txtRecords', 'type': '[str]'}, + 'a_records': {'key': 'properties.aRecords', 'type': '[str]'}, + 'alternate_c_name_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, + 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + c_name_records: Optional[List[str]] = None, + txt_records: Optional[List[str]] = None, + a_records: Optional[List[str]] = None, + alternate_c_name_records: Optional[List[str]] = None, + alternate_txt_records: Optional[List[str]] = None, + **kwargs + ): + super(CustomHostnameAnalysisResult, self).__init__(kind=kind, **kwargs) + self.is_hostname_already_verified = None + self.custom_domain_verification_test = None + self.custom_domain_verification_failure_info = None + self.has_conflict_on_scale_unit = None + self.has_conflict_across_subscription = None + self.conflicting_app_resource_id = None + self.c_name_records = c_name_records + self.txt_records = txt_records + self.a_records = a_records + self.alternate_c_name_records = alternate_c_name_records + self.alternate_txt_records = alternate_txt_records + + +class CustomOpenIdConnectProvider(ProxyOnlyResource): + """CustomOpenIdConnectProvider. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.OpenIdConnectRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.OpenIdConnectLogin + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'OpenIdConnectRegistration'}, + 'login': {'key': 'properties.login', 'type': 'OpenIdConnectLogin'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + registration: Optional["OpenIdConnectRegistration"] = None, + login: Optional["OpenIdConnectLogin"] = None, + **kwargs + ): + super(CustomOpenIdConnectProvider, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + + +class DatabaseBackupSetting(msrest.serialization.Model): + """Database backup settings. + + All required parameters must be populated in order to send to Azure. + + :param database_type: Required. Database type (e.g. SqlAzure / MySql). Possible values include: + "SqlAzure", "MySql", "LocalMySql", "PostgreSql". + :type database_type: str or ~azure.mgmt.web.v2020_12_01.models.DatabaseType + :param name: + :type name: str + :param connection_string_name: Contains a connection string name that is linked to the + SiteConfig.ConnectionStrings. + This is used during restore with overwrite connection strings options. + :type connection_string_name: str + :param connection_string: Contains a connection string to a database which is being backed up + or restored. If the restore should happen to a new database, the database name inside is the + new one. + :type connection_string: str + """ + + _validation = { + 'database_type': {'required': True}, + } + + _attribute_map = { + 'database_type': {'key': 'databaseType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string_name': {'key': 'connectionStringName', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + } + + def __init__( + self, + *, + database_type: Union[str, "DatabaseType"], + name: Optional[str] = None, + connection_string_name: Optional[str] = None, + connection_string: Optional[str] = None, + **kwargs + ): + super(DatabaseBackupSetting, self).__init__(**kwargs) + self.database_type = database_type + self.name = name + self.connection_string_name = connection_string_name + self.connection_string = connection_string + + +class DataProviderMetadata(msrest.serialization.Model): + """Additional configuration for a data providers. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param provider_name: + :type provider_name: str + :ivar property_bag: Settings for the data provider. + :vartype property_bag: list[~azure.mgmt.web.v2020_12_01.models.KeyValuePairStringObject] + """ + + _validation = { + 'property_bag': {'readonly': True}, + } + + _attribute_map = { + 'provider_name': {'key': 'providerName', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '[KeyValuePairStringObject]'}, + } + + def __init__( + self, + *, + provider_name: Optional[str] = None, + **kwargs + ): + super(DataProviderMetadata, self).__init__(**kwargs) + self.provider_name = provider_name + self.property_bag = None + + +class DataSource(msrest.serialization.Model): + """Class representing data source used by the detectors. + + :param instructions: Instructions if any for the data source. + :type instructions: list[str] + :param data_source_uri: Datasource Uri Links. + :type data_source_uri: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + """ + + _attribute_map = { + 'instructions': {'key': 'instructions', 'type': '[str]'}, + 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, + } + + def __init__( + self, + *, + instructions: Optional[List[str]] = None, + data_source_uri: Optional[List["NameValuePair"]] = None, + **kwargs + ): + super(DataSource, self).__init__(**kwargs) + self.instructions = instructions + self.data_source_uri = data_source_uri + + +class DataTableResponseColumn(msrest.serialization.Model): + """Column definition. + + :param column_name: Name of the column. + :type column_name: str + :param data_type: Data type which looks like 'String' or 'Int32'. + :type data_type: str + :param column_type: Column Type. + :type column_type: str + """ + + _attribute_map = { + 'column_name': {'key': 'columnName', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'column_type': {'key': 'columnType', 'type': 'str'}, + } + + def __init__( + self, + *, + column_name: Optional[str] = None, + data_type: Optional[str] = None, + column_type: Optional[str] = None, + **kwargs + ): + super(DataTableResponseColumn, self).__init__(**kwargs) + self.column_name = column_name + self.data_type = data_type + self.column_type = column_type + + +class DataTableResponseObject(msrest.serialization.Model): + """Data Table which defines columns and raw row values. + + :param table_name: Name of the table. + :type table_name: str + :param columns: List of columns with data types. + :type columns: list[~azure.mgmt.web.v2020_12_01.models.DataTableResponseColumn] + :param rows: Raw row values. + :type rows: list[list[str]] + """ + + _attribute_map = { + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'columns': {'key': 'columns', 'type': '[DataTableResponseColumn]'}, + 'rows': {'key': 'rows', 'type': '[[str]]'}, + } + + def __init__( + self, + *, + table_name: Optional[str] = None, + columns: Optional[List["DataTableResponseColumn"]] = None, + rows: Optional[List[List[str]]] = None, + **kwargs + ): + super(DataTableResponseObject, self).__init__(**kwargs) + self.table_name = table_name + self.columns = columns + self.rows = rows + + +class DefaultErrorResponse(msrest.serialization.Model): + """App Service error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: Error model. + :vartype error: ~azure.mgmt.web.v2020_12_01.models.DefaultErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, + } + + def __init__( + self, + **kwargs + ): + super(DefaultErrorResponse, self).__init__(**kwargs) + self.error = None + + +class DefaultErrorResponseError(msrest.serialization.Model): + """Error model. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Standardized string to programmatically identify the error. + :vartype code: str + :ivar message: Detailed error description and debugging information. + :vartype message: str + :ivar target: Detailed error description and debugging information. + :vartype target: str + :param details: + :type details: list[~azure.mgmt.web.v2020_12_01.models.DefaultErrorResponseErrorDetailsItem] + :ivar innererror: More information to debug error. + :vartype innererror: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'innererror': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[DefaultErrorResponseErrorDetailsItem]'}, + 'innererror': {'key': 'innererror', 'type': 'str'}, + } + + def __init__( + self, + *, + details: Optional[List["DefaultErrorResponseErrorDetailsItem"]] = None, + **kwargs + ): + super(DefaultErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = details + self.innererror = None + + +class DefaultErrorResponseErrorDetailsItem(msrest.serialization.Model): + """Detailed errors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Standardized string to programmatically identify the error. + :vartype code: str + :ivar message: Detailed error description and debugging information. + :vartype message: str + :ivar target: Detailed error description and debugging information. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DefaultErrorResponseErrorDetailsItem, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + + +class DeletedAppRestoreRequest(ProxyOnlyResource): + """Details about restoring a deleted app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param deleted_site_id: ARM resource ID of the deleted app. Example: + /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}. + :type deleted_site_id: str + :param recover_configuration: If true, deleted site configuration, in addition to content, will + be restored. + :type recover_configuration: bool + :param snapshot_time: Point in time to restore the deleted app from, formatted as a DateTime + string. + If unspecified, default value is the time that the app was deleted. + :type snapshot_time: str + :param use_dr_secondary: If true, the snapshot is retrieved from DRSecondary endpoint. + :type use_dr_secondary: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deleted_site_id': {'key': 'properties.deletedSiteId', 'type': 'str'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, + 'use_dr_secondary': {'key': 'properties.useDRSecondary', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + deleted_site_id: Optional[str] = None, + recover_configuration: Optional[bool] = None, + snapshot_time: Optional[str] = None, + use_dr_secondary: Optional[bool] = None, + **kwargs + ): + super(DeletedAppRestoreRequest, self).__init__(kind=kind, **kwargs) + self.deleted_site_id = deleted_site_id + self.recover_configuration = recover_configuration + self.snapshot_time = snapshot_time + self.use_dr_secondary = use_dr_secondary + + +class DeletedSite(ProxyOnlyResource): + """A deleted app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar deleted_site_id: Numeric id for the deleted site. + :vartype deleted_site_id: int + :ivar deleted_timestamp: Time in UTC when the app was deleted. + :vartype deleted_timestamp: str + :ivar subscription: Subscription containing the deleted site. + :vartype subscription: str + :ivar resource_group: ResourceGroup that contained the deleted site. + :vartype resource_group: str + :ivar deleted_site_name: Name of the deleted site. + :vartype deleted_site_name: str + :ivar slot: Slot of the deleted site. + :vartype slot: str + :ivar kind_properties_kind: Kind of site that was deleted. + :vartype kind_properties_kind: str + :ivar geo_region_name: Geo Region of the deleted site. + :vartype geo_region_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'deleted_site_id': {'readonly': True}, + 'deleted_timestamp': {'readonly': True}, + 'subscription': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'deleted_site_name': {'readonly': True}, + 'slot': {'readonly': True}, + 'kind_properties_kind': {'readonly': True}, + 'geo_region_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deleted_site_id': {'key': 'properties.deletedSiteId', 'type': 'int'}, + 'deleted_timestamp': {'key': 'properties.deletedTimestamp', 'type': 'str'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'deleted_site_name': {'key': 'properties.deletedSiteName', 'type': 'str'}, + 'slot': {'key': 'properties.slot', 'type': 'str'}, + 'kind_properties_kind': {'key': 'properties.kind', 'type': 'str'}, + 'geo_region_name': {'key': 'properties.geoRegionName', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(DeletedSite, self).__init__(kind=kind, **kwargs) + self.deleted_site_id = None + self.deleted_timestamp = None + self.subscription = None + self.resource_group = None + self.deleted_site_name = None + self.slot = None + self.kind_properties_kind = None + self.geo_region_name = None + + +class DeletedWebAppCollection(msrest.serialization.Model): + """Collection of deleted apps. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.DeletedSite] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedSite]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DeletedSite"], + **kwargs + ): + super(DeletedWebAppCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Deployment(ProxyOnlyResource): + """User credentials used for publishing activity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param status: Deployment status. + :type status: int + :param message: Details about deployment status. + :type message: str + :param author: Who authored the deployment. + :type author: str + :param deployer: Who performed the deployment. + :type deployer: str + :param author_email: Author email. + :type author_email: str + :param start_time: Start time. + :type start_time: ~datetime.datetime + :param end_time: End time. + :type end_time: ~datetime.datetime + :param active: True if deployment is currently active, false if completed and null if not + started. + :type active: bool + :param details: Details on deployment. + :type details: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'int'}, + 'message': {'key': 'properties.message', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'deployer': {'key': 'properties.deployer', 'type': 'str'}, + 'author_email': {'key': 'properties.author_email', 'type': 'str'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.end_time', 'type': 'iso-8601'}, + 'active': {'key': 'properties.active', 'type': 'bool'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + status: Optional[int] = None, + message: Optional[str] = None, + author: Optional[str] = None, + deployer: Optional[str] = None, + author_email: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + active: Optional[bool] = None, + details: Optional[str] = None, + **kwargs + ): + super(Deployment, self).__init__(kind=kind, **kwargs) + self.status = status + self.message = message + self.author = author + self.deployer = deployer + self.author_email = author_email + self.start_time = start_time + self.end_time = end_time + self.active = active + self.details = details + + +class DeploymentCollection(msrest.serialization.Model): + """Collection of app deployments. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Deployment] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Deployment]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Deployment"], + **kwargs + ): + super(DeploymentCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DeploymentLocations(msrest.serialization.Model): + """List of available locations (regions or App Service Environments) for +deployment of App Service resources. + + :param locations: Available regions. + :type locations: list[~azure.mgmt.web.v2020_12_01.models.GeoRegion] + :param hosting_environments: Available App Service Environments with full descriptions of the + environments. + :type hosting_environments: list[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironment] + :param hosting_environment_deployment_infos: Available App Service Environments with basic + information. + :type hosting_environment_deployment_infos: + list[~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentDeploymentInfo] + """ + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[GeoRegion]'}, + 'hosting_environments': {'key': 'hostingEnvironments', 'type': '[AppServiceEnvironment]'}, + 'hosting_environment_deployment_infos': {'key': 'hostingEnvironmentDeploymentInfos', 'type': '[HostingEnvironmentDeploymentInfo]'}, + } + + def __init__( + self, + *, + locations: Optional[List["GeoRegion"]] = None, + hosting_environments: Optional[List["AppServiceEnvironment"]] = None, + hosting_environment_deployment_infos: Optional[List["HostingEnvironmentDeploymentInfo"]] = None, + **kwargs + ): + super(DeploymentLocations, self).__init__(**kwargs) + self.locations = locations + self.hosting_environments = hosting_environments + self.hosting_environment_deployment_infos = hosting_environment_deployment_infos + + +class DetectorAbnormalTimePeriod(msrest.serialization.Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the correlated event. + :type start_time: ~datetime.datetime + :param end_time: End time of the correlated event. + :type end_time: ~datetime.datetime + :param message: Message describing the event. + :type message: str + :param source: Represents the name of the Detector. + :type source: str + :param priority: Represents the rank of the Detector. + :type priority: float + :param meta_data: Downtime metadata. + :type meta_data: list[list[~azure.mgmt.web.v2020_12_01.models.NameValuePair]] + :param type: Represents the type of the Detector. Possible values include: "ServiceIncident", + "AppDeployment", "AppCrash", "RuntimeIssueDetected", "AseDeployment", "UserIssue", + "PlatformIssue", "Other". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.IssueType + :param solutions: List of proposed solutions. + :type solutions: list[~azure.mgmt.web.v2020_12_01.models.Solution] + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'float'}, + 'meta_data': {'key': 'metaData', 'type': '[[NameValuePair]]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__( + self, + *, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + message: Optional[str] = None, + source: Optional[str] = None, + priority: Optional[float] = None, + meta_data: Optional[List[List["NameValuePair"]]] = None, + type: Optional[Union[str, "IssueType"]] = None, + solutions: Optional[List["Solution"]] = None, + **kwargs + ): + super(DetectorAbnormalTimePeriod, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.message = message + self.source = source + self.priority = priority + self.meta_data = meta_data + self.type = type + self.solutions = solutions + + +class DetectorDefinition(ProxyOnlyResource): + """Class representing detector definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: Display name of the detector. + :vartype display_name: str + :ivar description: Description of the detector. + :vartype description: str + :ivar rank: Detector Rank. + :vartype rank: float + :ivar is_enabled: Flag representing whether detector is enabled or not. + :vartype is_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'rank': {'readonly': True}, + 'is_enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'rank': {'key': 'properties.rank', 'type': 'float'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(DetectorDefinition, self).__init__(kind=kind, **kwargs) + self.display_name = None + self.description = None + self.rank = None + self.is_enabled = None + + +class DetectorInfo(msrest.serialization.Model): + """Definition of Detector. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Id of detector. + :vartype id: str + :ivar name: Name of detector. + :vartype name: str + :ivar description: Short description of the detector and its purpose. + :vartype description: str + :ivar author: Author of the detector. + :vartype author: str + :ivar category: Problem category. This serves for organizing group for detectors. + :vartype category: str + :ivar support_topic_list: List of Support Topics for which this detector is enabled. + :vartype support_topic_list: list[~azure.mgmt.web.v2020_12_01.models.SupportTopic] + :ivar analysis_type: Analysis Types for which this detector should apply to. + :vartype analysis_type: list[str] + :ivar type: Whether this detector is an Analysis Detector or not. Possible values include: + "Detector", "Analysis", "CategoryOverview". + :vartype type: str or ~azure.mgmt.web.v2020_12_01.models.DetectorType + :ivar score: Defines score of a detector to power ML based matching. + :vartype score: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'description': {'readonly': True}, + 'author': {'readonly': True}, + 'category': {'readonly': True}, + 'support_topic_list': {'readonly': True}, + 'analysis_type': {'readonly': True}, + 'type': {'readonly': True}, + 'score': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'author': {'key': 'author', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'support_topic_list': {'key': 'supportTopicList', 'type': '[SupportTopic]'}, + 'analysis_type': {'key': 'analysisType', 'type': '[str]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(DetectorInfo, self).__init__(**kwargs) + self.id = None + self.name = None + self.description = None + self.author = None + self.category = None + self.support_topic_list = None + self.analysis_type = None + self.type = None + self.score = None + + +class DetectorResponse(ProxyOnlyResource): + """Class representing Response from Detector. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param metadata: metadata for the detector. + :type metadata: ~azure.mgmt.web.v2020_12_01.models.DetectorInfo + :param dataset: Data Set. + :type dataset: list[~azure.mgmt.web.v2020_12_01.models.DiagnosticData] + :param status: Indicates status of the most severe insight. + :type status: ~azure.mgmt.web.v2020_12_01.models.Status + :param data_providers_metadata: Additional configuration for different data providers to be + used by the UI. + :type data_providers_metadata: list[~azure.mgmt.web.v2020_12_01.models.DataProviderMetadata] + :param suggested_utterances: Suggested utterances where the detector can be applicable. + :type suggested_utterances: ~azure.mgmt.web.v2020_12_01.models.QueryUtterancesResults + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': 'DetectorInfo'}, + 'dataset': {'key': 'properties.dataset', 'type': '[DiagnosticData]'}, + 'status': {'key': 'properties.status', 'type': 'Status'}, + 'data_providers_metadata': {'key': 'properties.dataProvidersMetadata', 'type': '[DataProviderMetadata]'}, + 'suggested_utterances': {'key': 'properties.suggestedUtterances', 'type': 'QueryUtterancesResults'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + metadata: Optional["DetectorInfo"] = None, + dataset: Optional[List["DiagnosticData"]] = None, + status: Optional["Status"] = None, + data_providers_metadata: Optional[List["DataProviderMetadata"]] = None, + suggested_utterances: Optional["QueryUtterancesResults"] = None, + **kwargs + ): + super(DetectorResponse, self).__init__(kind=kind, **kwargs) + self.metadata = metadata + self.dataset = dataset + self.status = status + self.data_providers_metadata = data_providers_metadata + self.suggested_utterances = suggested_utterances + + +class DetectorResponseCollection(msrest.serialization.Model): + """Collection of detector responses. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.DetectorResponse] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DetectorResponse]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DetectorResponse"], + **kwargs + ): + super(DetectorResponseCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DiagnosticAnalysis(ProxyOnlyResource): + """Class representing a diagnostic analysis done on an application. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param start_time: Start time of the period. + :type start_time: ~datetime.datetime + :param end_time: End time of the period. + :type end_time: ~datetime.datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: list[~azure.mgmt.web.v2020_12_01.models.AbnormalTimePeriod] + :param payload: Data by each detector. + :type payload: list[~azure.mgmt.web.v2020_12_01.models.AnalysisData] + :param non_correlated_detectors: Data by each detector for detectors that did not corelate. + :type non_correlated_detectors: list[~azure.mgmt.web.v2020_12_01.models.DetectorDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'abnormal_time_periods': {'key': 'properties.abnormalTimePeriods', 'type': '[AbnormalTimePeriod]'}, + 'payload': {'key': 'properties.payload', 'type': '[AnalysisData]'}, + 'non_correlated_detectors': {'key': 'properties.nonCorrelatedDetectors', 'type': '[DetectorDefinition]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + abnormal_time_periods: Optional[List["AbnormalTimePeriod"]] = None, + payload: Optional[List["AnalysisData"]] = None, + non_correlated_detectors: Optional[List["DetectorDefinition"]] = None, + **kwargs + ): + super(DiagnosticAnalysis, self).__init__(kind=kind, **kwargs) + self.start_time = start_time + self.end_time = end_time + self.abnormal_time_periods = abnormal_time_periods + self.payload = payload + self.non_correlated_detectors = non_correlated_detectors + + +class DiagnosticAnalysisCollection(msrest.serialization.Model): + """Collection of Diagnostic Analyses. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AnalysisDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["AnalysisDefinition"], + **kwargs + ): + super(DiagnosticAnalysisCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DiagnosticCategory(ProxyOnlyResource): + """Class representing detector definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar description: Description of the diagnostic category. + :vartype description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(DiagnosticCategory, self).__init__(kind=kind, **kwargs) + self.description = None + + +class DiagnosticCategoryCollection(msrest.serialization.Model): + """Collection of Diagnostic Categories. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiagnosticCategory]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DiagnosticCategory"], + **kwargs + ): + super(DiagnosticCategoryCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DiagnosticData(msrest.serialization.Model): + """Set of data with rendering instructions. + + :param table: Data in table form. + :type table: ~azure.mgmt.web.v2020_12_01.models.DataTableResponseObject + :param rendering_properties: Properties that describe how the table should be rendered. + :type rendering_properties: ~azure.mgmt.web.v2020_12_01.models.Rendering + """ + + _attribute_map = { + 'table': {'key': 'table', 'type': 'DataTableResponseObject'}, + 'rendering_properties': {'key': 'renderingProperties', 'type': 'Rendering'}, + } + + def __init__( + self, + *, + table: Optional["DataTableResponseObject"] = None, + rendering_properties: Optional["Rendering"] = None, + **kwargs + ): + super(DiagnosticData, self).__init__(**kwargs) + self.table = table + self.rendering_properties = rendering_properties + + +class DiagnosticDetectorCollection(msrest.serialization.Model): + """Collection of Diagnostic Detectors. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.DetectorDefinition] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DetectorDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DetectorDefinition"], + **kwargs + ): + super(DiagnosticDetectorCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DiagnosticDetectorResponse(ProxyOnlyResource): + """Class representing Response from Diagnostic Detectors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param start_time: Start time of the period. + :type start_time: ~datetime.datetime + :param end_time: End time of the period. + :type end_time: ~datetime.datetime + :param issue_detected: Flag representing Issue was detected. + :type issue_detected: bool + :param detector_definition: Detector's definition. + :type detector_definition: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition + :param metrics: Metrics provided by the detector. + :type metrics: list[~azure.mgmt.web.v2020_12_01.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the detector. + :type abnormal_time_periods: + list[~azure.mgmt.web.v2020_12_01.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.v2020_12_01.models.NameValuePair]] + :param response_meta_data: Meta Data. + :type response_meta_data: ~azure.mgmt.web.v2020_12_01.models.ResponseMetaData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'issue_detected': {'key': 'properties.issueDetected', 'type': 'bool'}, + 'detector_definition': {'key': 'properties.detectorDefinition', 'type': 'DetectorDefinition'}, + 'metrics': {'key': 'properties.metrics', 'type': '[DiagnosticMetricSet]'}, + 'abnormal_time_periods': {'key': 'properties.abnormalTimePeriods', 'type': '[DetectorAbnormalTimePeriod]'}, + 'data': {'key': 'properties.data', 'type': '[[NameValuePair]]'}, + 'response_meta_data': {'key': 'properties.responseMetaData', 'type': 'ResponseMetaData'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + issue_detected: Optional[bool] = None, + detector_definition: Optional["DetectorDefinition"] = None, + metrics: Optional[List["DiagnosticMetricSet"]] = None, + abnormal_time_periods: Optional[List["DetectorAbnormalTimePeriod"]] = None, + data: Optional[List[List["NameValuePair"]]] = None, + response_meta_data: Optional["ResponseMetaData"] = None, + **kwargs + ): + super(DiagnosticDetectorResponse, self).__init__(kind=kind, **kwargs) + self.start_time = start_time + self.end_time = end_time + self.issue_detected = issue_detected + self.detector_definition = detector_definition + self.metrics = metrics + self.abnormal_time_periods = abnormal_time_periods + self.data = data + self.response_meta_data = response_meta_data + + +class DiagnosticMetricSample(msrest.serialization.Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured. + :type timestamp: ~datetime.datetime + :param role_instance: Role Instance. Null if this counter is not per instance + This is returned and should be whichever instance name we desire to be returned + i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) + where RDWORKERNAME is Machine name below and RoleInstance name in parenthesis. + :type role_instance: str + :param total: Total value of the metric. If multiple measurements are made this will have sum + of all. + :type total: float + :param maximum: Maximum of the metric sampled during the time period. + :type maximum: float + :param minimum: Minimum of the metric sampled during the time period. + :type minimum: float + :param is_aggregated: Whether the values are aggregates across all workers or not. + :type is_aggregated: bool + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'role_instance': {'key': 'roleInstance', 'type': 'str'}, + 'total': {'key': 'total', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'is_aggregated': {'key': 'isAggregated', 'type': 'bool'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + role_instance: Optional[str] = None, + total: Optional[float] = None, + maximum: Optional[float] = None, + minimum: Optional[float] = None, + is_aggregated: Optional[bool] = None, + **kwargs + ): + super(DiagnosticMetricSample, self).__init__(**kwargs) + self.timestamp = timestamp + self.role_instance = role_instance + self.total = total + self.maximum = maximum + self.minimum = minimum + self.is_aggregated = is_aggregated + + +class DiagnosticMetricSet(msrest.serialization.Model): + """Class representing Diagnostic Metric information. + + :param name: Name of the metric. + :type name: str + :param unit: Metric's unit. + :type unit: str + :param start_time: Start time of the period. + :type start_time: ~datetime.datetime + :param end_time: End time of the period. + :type end_time: ~datetime.datetime + :param time_grain: Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D. + :type time_grain: str + :param values: Collection of metric values for the selected period based on the + {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}. + :type values: list[~azure.mgmt.web.v2020_12_01.models.DiagnosticMetricSample] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[DiagnosticMetricSample]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + unit: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + time_grain: Optional[str] = None, + values: Optional[List["DiagnosticMetricSample"]] = None, + **kwargs + ): + super(DiagnosticMetricSet, self).__init__(**kwargs) + self.name = name + self.unit = unit + self.start_time = start_time + self.end_time = end_time + self.time_grain = time_grain + self.values = values + + +class Dimension(msrest.serialization.Model): + """Dimension of a resource metric. For e.g. instance specific HTTP requests for a web app, +where instance name is dimension of the metric HTTP request. + + :param name: + :type name: str + :param display_name: + :type display_name: str + :param internal_name: + :type internal_name: str + :param to_be_exported_for_shoebox: + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + internal_name: Optional[str] = None, + to_be_exported_for_shoebox: Optional[bool] = None, + **kwargs + ): + super(Dimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.internal_name = internal_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class Domain(Resource): + """Information about a domain. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param contact_admin: Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_billing: Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_registrant: Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_tech: Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_12_01.models.Contact + :ivar registration_status: Domain registration status. Possible values include: "Active", + "Awaiting", "Cancelled", "Confiscated", "Disabled", "Excluded", "Expired", "Failed", "Held", + "Locked", "Parked", "Pending", "Reserved", "Reverted", "Suspended", "Transferred", "Unknown", + "Unlocked", "Unparked", "Updated", "JsonConverterFailed". + :vartype registration_status: str or ~azure.mgmt.web.v2020_12_01.models.DomainStatus + :ivar provisioning_state: Domain provisioning state. Possible values include: "Succeeded", + "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: :code:`true` if domain privacy is enabled for this domain; + otherwise, :code:`false`. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: ~datetime.datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: ~datetime.datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: ~datetime.datetime + :param auto_renew: :code:`true` if the domain should be automatically renewed; + otherwise, :code:`false`. + :type auto_renew: bool + :ivar ready_for_dns_record_management: :code:`true` if Azure can assign this + domain to App Service apps; otherwise, :code:`false`. This value will be + :code:`true` if domain registration status is active and + it is hosted on name servers Azure has programmatic access to. + :vartype ready_for_dns_record_management: bool + :ivar managed_host_names: All hostnames derived from the domain and assigned to Azure + resources. + :vartype managed_host_names: list[~azure.mgmt.web.v2020_12_01.models.HostName] + :param consent: Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_12_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str or + ~azure.mgmt.web.v2020_12_01.models.DomainPropertiesDomainNotRenewableReasonsItem] + :param dns_type: Current DNS type. Possible values include: "AzureDns", + "DefaultDomainRegistrarDns". + :type dns_type: str or ~azure.mgmt.web.v2020_12_01.models.DnsType + :param dns_zone_id: Azure DNS Zone to use. + :type dns_zone_id: str + :param target_dns_type: Target DNS type (would be used for migration). Possible values include: + "AzureDns", "DefaultDomainRegistrarDns". + :type target_dns_type: str or ~azure.mgmt.web.v2020_12_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'registration_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'name_servers': {'readonly': True}, + 'created_time': {'readonly': True}, + 'expiration_time': {'readonly': True}, + 'last_renewed_time': {'readonly': True}, + 'ready_for_dns_record_management': {'readonly': True}, + 'managed_host_names': {'readonly': True}, + 'domain_not_renewable_reasons': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'contact_admin': {'key': 'properties.contactAdmin', 'type': 'Contact'}, + 'contact_billing': {'key': 'properties.contactBilling', 'type': 'Contact'}, + 'contact_registrant': {'key': 'properties.contactRegistrant', 'type': 'Contact'}, + 'contact_tech': {'key': 'properties.contactTech', 'type': 'Contact'}, + 'registration_status': {'key': 'properties.registrationStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name_servers': {'key': 'properties.nameServers', 'type': '[str]'}, + 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + 'last_renewed_time': {'key': 'properties.lastRenewedTime', 'type': 'iso-8601'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'ready_for_dns_record_management': {'key': 'properties.readyForDnsRecordManagement', 'type': 'bool'}, + 'managed_host_names': {'key': 'properties.managedHostNames', 'type': '[HostName]'}, + 'consent': {'key': 'properties.consent', 'type': 'DomainPurchaseConsent'}, + 'domain_not_renewable_reasons': {'key': 'properties.domainNotRenewableReasons', 'type': '[str]'}, + 'dns_type': {'key': 'properties.dnsType', 'type': 'str'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'str'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + contact_admin: Optional["Contact"] = None, + contact_billing: Optional["Contact"] = None, + contact_registrant: Optional["Contact"] = None, + contact_tech: Optional["Contact"] = None, + privacy: Optional[bool] = None, + auto_renew: Optional[bool] = True, + consent: Optional["DomainPurchaseConsent"] = None, + dns_type: Optional[Union[str, "DnsType"]] = None, + dns_zone_id: Optional[str] = None, + target_dns_type: Optional[Union[str, "DnsType"]] = None, + auth_code: Optional[str] = None, + **kwargs + ): + super(Domain, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.contact_admin = contact_admin + self.contact_billing = contact_billing + self.contact_registrant = contact_registrant + self.contact_tech = contact_tech + self.registration_status = None + self.provisioning_state = None + self.name_servers = None + self.privacy = privacy + self.created_time = None + self.expiration_time = None + self.last_renewed_time = None + self.auto_renew = auto_renew + self.ready_for_dns_record_management = None + self.managed_host_names = None + self.consent = consent + self.domain_not_renewable_reasons = None + self.dns_type = dns_type + self.dns_zone_id = dns_zone_id + self.target_dns_type = target_dns_type + self.auth_code = auth_code + + +class DomainAvailabilityCheckResult(msrest.serialization.Model): + """Domain availability check result. + + :param name: Name of the domain. + :type name: str + :param available: :code:`true` if domain can be purchased using CreateDomain API; + otherwise, :code:`false`. + :type available: bool + :param domain_type: Valid values are Regular domain: Azure will charge the full price of domain + registration, SoftDeleted: Purchasing this domain will simply restore it and this operation + will not cost anything. Possible values include: "Regular", "SoftDeleted". + :type domain_type: str or ~azure.mgmt.web.v2020_12_01.models.DomainType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available': {'key': 'available', 'type': 'bool'}, + 'domain_type': {'key': 'domainType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + available: Optional[bool] = None, + domain_type: Optional[Union[str, "DomainType"]] = None, + **kwargs + ): + super(DomainAvailabilityCheckResult, self).__init__(**kwargs) + self.name = name + self.available = available + self.domain_type = domain_type + + +class DomainCollection(msrest.serialization.Model): + """Collection of domains. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Domain] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Domain]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Domain"], + **kwargs + ): + super(DomainCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DomainControlCenterSsoRequest(msrest.serialization.Model): + """Single sign-on request information for domain management. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar url: URL where the single sign-on request is to be made. + :vartype url: str + :ivar post_parameter_key: Post parameter key. + :vartype post_parameter_key: str + :ivar post_parameter_value: Post parameter value. Client should use + 'application/x-www-form-urlencoded' encoding for this value. + :vartype post_parameter_value: str + """ + + _validation = { + 'url': {'readonly': True}, + 'post_parameter_key': {'readonly': True}, + 'post_parameter_value': {'readonly': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + 'post_parameter_key': {'key': 'postParameterKey', 'type': 'str'}, + 'post_parameter_value': {'key': 'postParameterValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DomainControlCenterSsoRequest, self).__init__(**kwargs) + self.url = None + self.post_parameter_key = None + self.post_parameter_value = None + + +class DomainOwnershipIdentifier(ProxyOnlyResource): + """Domain ownership Identifier. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param ownership_id: Ownership Id. + :type ownership_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ownership_id': {'key': 'properties.ownershipId', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + ownership_id: Optional[str] = None, + **kwargs + ): + super(DomainOwnershipIdentifier, self).__init__(kind=kind, **kwargs) + self.ownership_id = ownership_id + + +class DomainOwnershipIdentifierCollection(msrest.serialization.Model): + """Collection of domain ownership identifiers. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DomainOwnershipIdentifier]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DomainOwnershipIdentifier"], + **kwargs + ): + super(DomainOwnershipIdentifierCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DomainPatchResource(ProxyOnlyResource): + """ARM resource for a domain. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param contact_admin: Administrative contact. + :type contact_admin: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_billing: Billing contact. + :type contact_billing: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_registrant: Registrant contact. + :type contact_registrant: ~azure.mgmt.web.v2020_12_01.models.Contact + :param contact_tech: Technical contact. + :type contact_tech: ~azure.mgmt.web.v2020_12_01.models.Contact + :ivar registration_status: Domain registration status. Possible values include: "Active", + "Awaiting", "Cancelled", "Confiscated", "Disabled", "Excluded", "Expired", "Failed", "Held", + "Locked", "Parked", "Pending", "Reserved", "Reverted", "Suspended", "Transferred", "Unknown", + "Unlocked", "Unparked", "Updated", "JsonConverterFailed". + :vartype registration_status: str or ~azure.mgmt.web.v2020_12_01.models.DomainStatus + :ivar provisioning_state: Domain provisioning state. Possible values include: "Succeeded", + "Failed", "Canceled", "InProgress", "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.web.v2020_12_01.models.ProvisioningState + :ivar name_servers: Name servers. + :vartype name_servers: list[str] + :param privacy: :code:`true` if domain privacy is enabled for this domain; + otherwise, :code:`false`. + :type privacy: bool + :ivar created_time: Domain creation timestamp. + :vartype created_time: ~datetime.datetime + :ivar expiration_time: Domain expiration timestamp. + :vartype expiration_time: ~datetime.datetime + :ivar last_renewed_time: Timestamp when the domain was renewed last time. + :vartype last_renewed_time: ~datetime.datetime + :param auto_renew: :code:`true` if the domain should be automatically renewed; + otherwise, :code:`false`. + :type auto_renew: bool + :ivar ready_for_dns_record_management: :code:`true` if Azure can assign this + domain to App Service apps; otherwise, :code:`false`. This value will be + :code:`true` if domain registration status is active and + it is hosted on name servers Azure has programmatic access to. + :vartype ready_for_dns_record_management: bool + :ivar managed_host_names: All hostnames derived from the domain and assigned to Azure + resources. + :vartype managed_host_names: list[~azure.mgmt.web.v2020_12_01.models.HostName] + :param consent: Legal agreement consent. + :type consent: ~azure.mgmt.web.v2020_12_01.models.DomainPurchaseConsent + :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. + :vartype domain_not_renewable_reasons: list[str or + ~azure.mgmt.web.v2020_12_01.models.DomainPatchResourcePropertiesDomainNotRenewableReasonsItem] + :param dns_type: Current DNS type. Possible values include: "AzureDns", + "DefaultDomainRegistrarDns". + :type dns_type: str or ~azure.mgmt.web.v2020_12_01.models.DnsType + :param dns_zone_id: Azure DNS Zone to use. + :type dns_zone_id: str + :param target_dns_type: Target DNS type (would be used for migration). Possible values include: + "AzureDns", "DefaultDomainRegistrarDns". + :type target_dns_type: str or ~azure.mgmt.web.v2020_12_01.models.DnsType + :param auth_code: + :type auth_code: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'registration_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'name_servers': {'readonly': True}, + 'created_time': {'readonly': True}, + 'expiration_time': {'readonly': True}, + 'last_renewed_time': {'readonly': True}, + 'ready_for_dns_record_management': {'readonly': True}, + 'managed_host_names': {'readonly': True}, + 'domain_not_renewable_reasons': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'contact_admin': {'key': 'properties.contactAdmin', 'type': 'Contact'}, + 'contact_billing': {'key': 'properties.contactBilling', 'type': 'Contact'}, + 'contact_registrant': {'key': 'properties.contactRegistrant', 'type': 'Contact'}, + 'contact_tech': {'key': 'properties.contactTech', 'type': 'Contact'}, + 'registration_status': {'key': 'properties.registrationStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name_servers': {'key': 'properties.nameServers', 'type': '[str]'}, + 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + 'last_renewed_time': {'key': 'properties.lastRenewedTime', 'type': 'iso-8601'}, + 'auto_renew': {'key': 'properties.autoRenew', 'type': 'bool'}, + 'ready_for_dns_record_management': {'key': 'properties.readyForDnsRecordManagement', 'type': 'bool'}, + 'managed_host_names': {'key': 'properties.managedHostNames', 'type': '[HostName]'}, + 'consent': {'key': 'properties.consent', 'type': 'DomainPurchaseConsent'}, + 'domain_not_renewable_reasons': {'key': 'properties.domainNotRenewableReasons', 'type': '[str]'}, + 'dns_type': {'key': 'properties.dnsType', 'type': 'str'}, + 'dns_zone_id': {'key': 'properties.dnsZoneId', 'type': 'str'}, + 'target_dns_type': {'key': 'properties.targetDnsType', 'type': 'str'}, + 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + contact_admin: Optional["Contact"] = None, + contact_billing: Optional["Contact"] = None, + contact_registrant: Optional["Contact"] = None, + contact_tech: Optional["Contact"] = None, + privacy: Optional[bool] = None, + auto_renew: Optional[bool] = True, + consent: Optional["DomainPurchaseConsent"] = None, + dns_type: Optional[Union[str, "DnsType"]] = None, + dns_zone_id: Optional[str] = None, + target_dns_type: Optional[Union[str, "DnsType"]] = None, + auth_code: Optional[str] = None, + **kwargs + ): + super(DomainPatchResource, self).__init__(kind=kind, **kwargs) + self.contact_admin = contact_admin + self.contact_billing = contact_billing + self.contact_registrant = contact_registrant + self.contact_tech = contact_tech + self.registration_status = None + self.provisioning_state = None + self.name_servers = None + self.privacy = privacy + self.created_time = None + self.expiration_time = None + self.last_renewed_time = None + self.auto_renew = auto_renew + self.ready_for_dns_record_management = None + self.managed_host_names = None + self.consent = consent + self.domain_not_renewable_reasons = None + self.dns_type = dns_type + self.dns_zone_id = dns_zone_id + self.target_dns_type = target_dns_type + self.auth_code = auth_code + + +class DomainPurchaseConsent(msrest.serialization.Model): + """Domain purchase consent object, representing acceptance of applicable legal agreements. + + :param agreement_keys: List of applicable legal agreement keys. This list can be retrieved + using ListLegalAgreements API under :code:`TopLevelDomain` resource. + :type agreement_keys: list[str] + :param agreed_by: Client IP address. + :type agreed_by: str + :param agreed_at: Timestamp when the agreements were accepted. + :type agreed_at: ~datetime.datetime + """ + + _attribute_map = { + 'agreement_keys': {'key': 'agreementKeys', 'type': '[str]'}, + 'agreed_by': {'key': 'agreedBy', 'type': 'str'}, + 'agreed_at': {'key': 'agreedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + agreement_keys: Optional[List[str]] = None, + agreed_by: Optional[str] = None, + agreed_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(DomainPurchaseConsent, self).__init__(**kwargs) + self.agreement_keys = agreement_keys + self.agreed_by = agreed_by + self.agreed_at = agreed_at + + +class DomainRecommendationSearchParameters(msrest.serialization.Model): + """Domain recommendation search parameters. + + :param keywords: Keywords to be used for generating domain recommendations. + :type keywords: str + :param max_domain_recommendations: Maximum number of recommendations. + :type max_domain_recommendations: int + """ + + _attribute_map = { + 'keywords': {'key': 'keywords', 'type': 'str'}, + 'max_domain_recommendations': {'key': 'maxDomainRecommendations', 'type': 'int'}, + } + + def __init__( + self, + *, + keywords: Optional[str] = None, + max_domain_recommendations: Optional[int] = None, + **kwargs + ): + super(DomainRecommendationSearchParameters, self).__init__(**kwargs) + self.keywords = keywords + self.max_domain_recommendations = max_domain_recommendations + + +class EnabledConfig(msrest.serialization.Model): + """Enabled configuration. + + :param enabled: True if configuration is enabled, false if it is disabled and null if + configuration is not set. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + **kwargs + ): + super(EnabledConfig, self).__init__(**kwargs) + self.enabled = enabled + + +class EndpointDependency(msrest.serialization.Model): + """A domain name that a service is reached at, including details of the current connection status. + + :param domain_name: The domain name of the dependency. + :type domain_name: str + :param endpoint_details: The IP Addresses and Ports used when connecting to DomainName. + :type endpoint_details: list[~azure.mgmt.web.v2020_12_01.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[List["EndpointDetail"]] = None, + **kwargs + ): + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(msrest.serialization.Model): + """Current TCP connectivity information from the App Service Environment to a single endpoint. + + :param ip_address: An IP Address that Domain Name currently resolves to. + :type ip_address: str + :param port: The port an endpoint is connected to. + :type port: int + :param latency: The time in milliseconds it takes for a TCP connection to be created from the + App Service Environment to this IpAddress at this Port. + :type latency: float + :param is_accessible: Whether it is possible to create a TCP connection from the App Service + Environment to this IpAddress at this Port. + :type is_accessible: bool + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'latency': {'key': 'latency', 'type': 'float'}, + 'is_accessible': {'key': 'isAccessible', 'type': 'bool'}, + } + + def __init__( + self, + *, + ip_address: Optional[str] = None, + port: Optional[int] = None, + latency: Optional[float] = None, + is_accessible: Optional[bool] = None, + **kwargs + ): + super(EndpointDetail, self).__init__(**kwargs) + self.ip_address = ip_address + self.port = port + self.latency = latency + self.is_accessible = is_accessible + + +class ErrorEntity(msrest.serialization.Model): + """Body of the error response returned from the API. + + :param extended_code: Type of error. + :type extended_code: str + :param message_template: Message template. + :type message_template: str + :param parameters: Parameters for the template. + :type parameters: list[str] + :param inner_errors: Inner errors. + :type inner_errors: list[~azure.mgmt.web.v2020_12_01.models.ErrorEntity] + :param code: Basic error code. + :type code: str + :param message: Any details of the error. + :type message: str + """ + + _attribute_map = { + 'extended_code': {'key': 'extendedCode', 'type': 'str'}, + 'message_template': {'key': 'messageTemplate', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[str]'}, + 'inner_errors': {'key': 'innerErrors', 'type': '[ErrorEntity]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + extended_code: Optional[str] = None, + message_template: Optional[str] = None, + parameters: Optional[List[str]] = None, + inner_errors: Optional[List["ErrorEntity"]] = None, + code: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(ErrorEntity, self).__init__(**kwargs) + self.extended_code = extended_code + self.message_template = message_template + self.parameters = parameters + self.inner_errors = inner_errors + self.code = code + self.message = message + + +class Experiments(msrest.serialization.Model): + """Routing rules in production experiments. + + :param ramp_up_rules: List of ramp-up rules. + :type ramp_up_rules: list[~azure.mgmt.web.v2020_12_01.models.RampUpRule] + """ + + _attribute_map = { + 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, + } + + def __init__( + self, + *, + ramp_up_rules: Optional[List["RampUpRule"]] = None, + **kwargs + ): + super(Experiments, self).__init__(**kwargs) + self.ramp_up_rules = ramp_up_rules + + +class Facebook(ProxyOnlyResource): + """Facebook. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.AppRegistration + :param graph_api_version: + :type graph_api_version: str + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.LoginScopes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'AppRegistration'}, + 'graph_api_version': {'key': 'properties.graphApiVersion', 'type': 'str'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + registration: Optional["AppRegistration"] = None, + graph_api_version: Optional[str] = None, + login: Optional["LoginScopes"] = None, + **kwargs + ): + super(Facebook, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.graph_api_version = graph_api_version + self.login = login + + +class FileSystemApplicationLogsConfig(msrest.serialization.Model): + """Application logs to file system configuration. + + :param level: Log level. Possible values include: "Off", "Verbose", "Information", "Warning", + "Error". + :type level: str or ~azure.mgmt.web.v2020_12_01.models.LogLevel + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'str'}, + } + + def __init__( + self, + *, + level: Optional[Union[str, "LogLevel"]] = None, + **kwargs + ): + super(FileSystemApplicationLogsConfig, self).__init__(**kwargs) + self.level = level + + +class FileSystemHttpLogsConfig(msrest.serialization.Model): + """Http logs to file system configuration. + + :param retention_in_mb: Maximum size in megabytes that http log files can use. + When reached old log files will be removed to make space for new ones. + Value can range between 25 and 100. + :type retention_in_mb: int + :param retention_in_days: Retention in days. + Remove files older than X days. + 0 or lower means no retention. + :type retention_in_days: int + :param enabled: True if configuration is enabled, false if it is disabled and null if + configuration is not set. + :type enabled: bool + """ + + _validation = { + 'retention_in_mb': {'maximum': 100, 'minimum': 25}, + } + + _attribute_map = { + 'retention_in_mb': {'key': 'retentionInMb', 'type': 'int'}, + 'retention_in_days': {'key': 'retentionInDays', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + retention_in_mb: Optional[int] = None, + retention_in_days: Optional[int] = None, + enabled: Optional[bool] = None, + **kwargs + ): + super(FileSystemHttpLogsConfig, self).__init__(**kwargs) + self.retention_in_mb = retention_in_mb + self.retention_in_days = retention_in_days + self.enabled = enabled + + +class FileSystemTokenStore(ProxyOnlyResource): + """FileSystemTokenStore. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param directory: + :type directory: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'directory': {'key': 'properties.directory', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + directory: Optional[str] = None, + **kwargs + ): + super(FileSystemTokenStore, self).__init__(kind=kind, **kwargs) + self.directory = directory + + +class ForwardProxy(ProxyOnlyResource): + """ForwardProxy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param convention: Possible values include: "NoProxy", "Standard", "Custom". + :type convention: str or ~azure.mgmt.web.v2020_12_01.models.ForwardProxyConvention + :param custom_host_header_name: + :type custom_host_header_name: str + :param custom_proto_header_name: + :type custom_proto_header_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'convention': {'key': 'properties.convention', 'type': 'str'}, + 'custom_host_header_name': {'key': 'properties.customHostHeaderName', 'type': 'str'}, + 'custom_proto_header_name': {'key': 'properties.customProtoHeaderName', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + convention: Optional[Union[str, "ForwardProxyConvention"]] = None, + custom_host_header_name: Optional[str] = None, + custom_proto_header_name: Optional[str] = None, + **kwargs + ): + super(ForwardProxy, self).__init__(kind=kind, **kwargs) + self.convention = convention + self.custom_host_header_name = custom_host_header_name + self.custom_proto_header_name = custom_proto_header_name + + +class FunctionAppMajorVersion(msrest.serialization.Model): + """Function App stack major version. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_text: Function App stack major version (display only). + :vartype display_text: str + :ivar value: Function App stack major version name. + :vartype value: str + :ivar minor_versions: Minor versions associated with the major version. + :vartype minor_versions: list[~azure.mgmt.web.v2020_12_01.models.FunctionAppMinorVersion] + """ + + _validation = { + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'minor_versions': {'readonly': True}, + } + + _attribute_map = { + 'display_text': {'key': 'displayText', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'minor_versions': {'key': 'minorVersions', 'type': '[FunctionAppMinorVersion]'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionAppMajorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.minor_versions = None + + +class FunctionAppMinorVersion(msrest.serialization.Model): + """Function App stack minor version. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_text: Function App stack (display only). + :vartype display_text: str + :ivar value: Function App stack name. + :vartype value: str + :ivar stack_settings: Settings associated with the minor version. + :vartype stack_settings: ~azure.mgmt.web.v2020_12_01.models.FunctionAppRuntimes + """ + + _validation = { + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'stack_settings': {'readonly': True}, + } + + _attribute_map = { + 'display_text': {'key': 'displayText', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'stack_settings': {'key': 'stackSettings', 'type': 'FunctionAppRuntimes'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionAppMinorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.stack_settings = None + + +class FunctionAppRuntimes(msrest.serialization.Model): + """Function App stack runtimes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar linux_runtime_settings: Linux-specific settings associated with the minor version. + :vartype linux_runtime_settings: ~azure.mgmt.web.v2020_12_01.models.FunctionAppRuntimeSettings + :ivar windows_runtime_settings: Windows-specific settings associated with the minor version. + :vartype windows_runtime_settings: + ~azure.mgmt.web.v2020_12_01.models.FunctionAppRuntimeSettings + """ + + _validation = { + 'linux_runtime_settings': {'readonly': True}, + 'windows_runtime_settings': {'readonly': True}, + } + + _attribute_map = { + 'linux_runtime_settings': {'key': 'linuxRuntimeSettings', 'type': 'FunctionAppRuntimeSettings'}, + 'windows_runtime_settings': {'key': 'windowsRuntimeSettings', 'type': 'FunctionAppRuntimeSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionAppRuntimes, self).__init__(**kwargs) + self.linux_runtime_settings = None + self.windows_runtime_settings = None + + +class FunctionAppRuntimeSettings(msrest.serialization.Model): + """Function App runtime settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar runtime_version: Function App stack minor version (runtime only). + :vartype runtime_version: str + :ivar remote_debugging_supported: :code:`true` if remote debugging is supported + for the stack; otherwise, :code:`false`. + :vartype remote_debugging_supported: bool + :ivar app_insights_settings: Application Insights settings associated with the minor version. + :vartype app_insights_settings: + ~azure.mgmt.web.v2020_12_01.models.AppInsightsWebAppStackSettings + :ivar git_hub_action_settings: GitHub Actions settings associated with the minor version. + :vartype git_hub_action_settings: + ~azure.mgmt.web.v2020_12_01.models.GitHubActionWebAppStackSettings + :ivar app_settings_dictionary: Application settings associated with the minor version. + :vartype app_settings_dictionary: dict[str, str] + :ivar site_config_properties_dictionary: Configuration settings associated with the minor + version. + :vartype site_config_properties_dictionary: + ~azure.mgmt.web.v2020_12_01.models.SiteConfigPropertiesDictionary + :ivar supported_functions_extension_versions: List of supported Functions extension versions. + :vartype supported_functions_extension_versions: list[str] + :ivar is_preview: :code:`true` if the stack is in preview; otherwise, + :code:`false`. + :vartype is_preview: bool + :ivar is_deprecated: :code:`true` if the stack is deprecated; otherwise, + :code:`false`. + :vartype is_deprecated: bool + :ivar is_hidden: :code:`true` if the stack should be hidden; otherwise, + :code:`false`. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: ~datetime.datetime + :ivar is_auto_update: :code:`true` if the stack version is auto-updated; + otherwise, :code:`false`. + :vartype is_auto_update: bool + :ivar is_early_access: :code:`true` if the minor version is early-access; + otherwise, :code:`false`. + :vartype is_early_access: bool + :ivar is_default: :code:`true` if the minor version the default; otherwise, + :code:`false`. + :vartype is_default: bool + """ + + _validation = { + 'runtime_version': {'readonly': True}, + 'remote_debugging_supported': {'readonly': True}, + 'app_insights_settings': {'readonly': True}, + 'git_hub_action_settings': {'readonly': True}, + 'app_settings_dictionary': {'readonly': True}, + 'site_config_properties_dictionary': {'readonly': True}, + 'supported_functions_extension_versions': {'readonly': True}, + 'is_preview': {'readonly': True}, + 'is_deprecated': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'end_of_life_date': {'readonly': True}, + 'is_auto_update': {'readonly': True}, + 'is_early_access': {'readonly': True}, + 'is_default': {'readonly': True}, + } + + _attribute_map = { + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'remote_debugging_supported': {'key': 'remoteDebuggingSupported', 'type': 'bool'}, + 'app_insights_settings': {'key': 'appInsightsSettings', 'type': 'AppInsightsWebAppStackSettings'}, + 'git_hub_action_settings': {'key': 'gitHubActionSettings', 'type': 'GitHubActionWebAppStackSettings'}, + 'app_settings_dictionary': {'key': 'appSettingsDictionary', 'type': '{str}'}, + 'site_config_properties_dictionary': {'key': 'siteConfigPropertiesDictionary', 'type': 'SiteConfigPropertiesDictionary'}, + 'supported_functions_extension_versions': {'key': 'supportedFunctionsExtensionVersions', 'type': '[str]'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'is_auto_update': {'key': 'isAutoUpdate', 'type': 'bool'}, + 'is_early_access': {'key': 'isEarlyAccess', 'type': 'bool'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(FunctionAppRuntimeSettings, self).__init__(**kwargs) + self.runtime_version = None + self.remote_debugging_supported = None + self.app_insights_settings = None + self.git_hub_action_settings = None + self.app_settings_dictionary = None + self.site_config_properties_dictionary = None + self.supported_functions_extension_versions = None + self.is_preview = None + self.is_deprecated = None + self.is_hidden = None + self.end_of_life_date = None + self.is_auto_update = None + self.is_early_access = None + self.is_default = None + + +class FunctionAppStack(ProxyOnlyResource): + """Function App Stack. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Function App stack location. + :vartype location: str + :ivar display_text: Function App stack (display only). + :vartype display_text: str + :ivar value: Function App stack name. + :vartype value: str + :ivar major_versions: List of major versions available. + :vartype major_versions: list[~azure.mgmt.web.v2020_12_01.models.FunctionAppMajorVersion] + :ivar preferred_os: Function App stack preferred OS. Possible values include: "Windows", + "Linux". + :vartype preferred_os: str or ~azure.mgmt.web.v2020_12_01.models.StackPreferredOs + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'major_versions': {'readonly': True}, + 'preferred_os': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'display_text': {'key': 'properties.displayText', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'major_versions': {'key': 'properties.majorVersions', 'type': '[FunctionAppMajorVersion]'}, + 'preferred_os': {'key': 'properties.preferredOs', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(FunctionAppStack, self).__init__(kind=kind, **kwargs) + self.location = None + self.display_text = None + self.value = None + self.major_versions = None + self.preferred_os = None + + +class FunctionAppStackCollection(msrest.serialization.Model): + """Collection of Function app Stacks. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.FunctionAppStack] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FunctionAppStack]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["FunctionAppStack"], + **kwargs + ): + super(FunctionAppStackCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class FunctionEnvelope(ProxyOnlyResource): + """Function information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param function_app_id: Function App ID. + :type function_app_id: str + :param script_root_path_href: Script root path URI. + :type script_root_path_href: str + :param script_href: Script URI. + :type script_href: str + :param config_href: Config URI. + :type config_href: str + :param test_data_href: Test data URI. + :type test_data_href: str + :param secrets_file_href: Secrets file URI. + :type secrets_file_href: str + :param href: Function URI. + :type href: str + :param config: Config information. + :type config: object + :param files: File list. + :type files: dict[str, str] + :param test_data: Test data used when testing via the Azure Portal. + :type test_data: str + :param invoke_url_template: The invocation URL. + :type invoke_url_template: str + :param language: The function language. + :type language: str + :param is_disabled: Gets or sets a value indicating whether the function is disabled. + :type is_disabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'function_app_id': {'key': 'properties.function_app_id', 'type': 'str'}, + 'script_root_path_href': {'key': 'properties.script_root_path_href', 'type': 'str'}, + 'script_href': {'key': 'properties.script_href', 'type': 'str'}, + 'config_href': {'key': 'properties.config_href', 'type': 'str'}, + 'test_data_href': {'key': 'properties.test_data_href', 'type': 'str'}, + 'secrets_file_href': {'key': 'properties.secrets_file_href', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'config': {'key': 'properties.config', 'type': 'object'}, + 'files': {'key': 'properties.files', 'type': '{str}'}, + 'test_data': {'key': 'properties.test_data', 'type': 'str'}, + 'invoke_url_template': {'key': 'properties.invoke_url_template', 'type': 'str'}, + 'language': {'key': 'properties.language', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + function_app_id: Optional[str] = None, + script_root_path_href: Optional[str] = None, + script_href: Optional[str] = None, + config_href: Optional[str] = None, + test_data_href: Optional[str] = None, + secrets_file_href: Optional[str] = None, + href: Optional[str] = None, + config: Optional[object] = None, + files: Optional[Dict[str, str]] = None, + test_data: Optional[str] = None, + invoke_url_template: Optional[str] = None, + language: Optional[str] = None, + is_disabled: Optional[bool] = None, + **kwargs + ): + super(FunctionEnvelope, self).__init__(kind=kind, **kwargs) + self.function_app_id = function_app_id + self.script_root_path_href = script_root_path_href + self.script_href = script_href + self.config_href = config_href + self.test_data_href = test_data_href + self.secrets_file_href = secrets_file_href + self.href = href + self.config = config + self.files = files + self.test_data = test_data + self.invoke_url_template = invoke_url_template + self.language = language + self.is_disabled = is_disabled + + +class FunctionEnvelopeCollection(msrest.serialization.Model): + """Collection of Kudu function information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FunctionEnvelope]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["FunctionEnvelope"], + **kwargs + ): + super(FunctionEnvelopeCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class FunctionSecrets(msrest.serialization.Model): + """Function secrets. + + :param key: Secret key. + :type key: str + :param trigger_url: Trigger URL. + :type trigger_url: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'trigger_url': {'key': 'trigger_url', 'type': 'str'}, + } + + def __init__( + self, + *, + key: Optional[str] = None, + trigger_url: Optional[str] = None, + **kwargs + ): + super(FunctionSecrets, self).__init__(**kwargs) + self.key = key + self.trigger_url = trigger_url + + +class GeoRegion(ProxyOnlyResource): + """Geographical region. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar description: Region description. + :vartype description: str + :ivar display_name: Display name for region. + :vartype display_name: str + :ivar org_domain: Display name for region. + :vartype org_domain: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'display_name': {'readonly': True}, + 'org_domain': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'org_domain': {'key': 'properties.orgDomain', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(GeoRegion, self).__init__(kind=kind, **kwargs) + self.description = None + self.display_name = None + self.org_domain = None + + +class GeoRegionCollection(msrest.serialization.Model): + """Collection of geographical regions. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.GeoRegion] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[GeoRegion]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["GeoRegion"], + **kwargs + ): + super(GeoRegionCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class GitHub(ProxyOnlyResource): + """GitHub. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.LoginScopes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'ClientRegistration'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + registration: Optional["ClientRegistration"] = None, + login: Optional["LoginScopes"] = None, + **kwargs + ): + super(GitHub, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + + +class GitHubActionCodeConfiguration(msrest.serialization.Model): + """The GitHub action code configuration. + + :param runtime_stack: Runtime stack is used to determine the workflow file content for code + base apps. + :type runtime_stack: str + :param runtime_version: Runtime version is used to determine what build version to set in the + workflow file. + :type runtime_version: str + """ + + _attribute_map = { + 'runtime_stack': {'key': 'runtimeStack', 'type': 'str'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + runtime_stack: Optional[str] = None, + runtime_version: Optional[str] = None, + **kwargs + ): + super(GitHubActionCodeConfiguration, self).__init__(**kwargs) + self.runtime_stack = runtime_stack + self.runtime_version = runtime_version + + +class GitHubActionConfiguration(msrest.serialization.Model): + """The GitHub action configuration. + + :param code_configuration: GitHub Action code configuration. + :type code_configuration: ~azure.mgmt.web.v2020_12_01.models.GitHubActionCodeConfiguration + :param container_configuration: GitHub Action container configuration. + :type container_configuration: + ~azure.mgmt.web.v2020_12_01.models.GitHubActionContainerConfiguration + :param is_linux: This will help determine the workflow configuration to select. + :type is_linux: bool + :param generate_workflow_file: Workflow option to determine whether the workflow file should be + generated and written to the repository. + :type generate_workflow_file: bool + """ + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'GitHubActionCodeConfiguration'}, + 'container_configuration': {'key': 'containerConfiguration', 'type': 'GitHubActionContainerConfiguration'}, + 'is_linux': {'key': 'isLinux', 'type': 'bool'}, + 'generate_workflow_file': {'key': 'generateWorkflowFile', 'type': 'bool'}, + } + + def __init__( + self, + *, + code_configuration: Optional["GitHubActionCodeConfiguration"] = None, + container_configuration: Optional["GitHubActionContainerConfiguration"] = None, + is_linux: Optional[bool] = None, + generate_workflow_file: Optional[bool] = None, + **kwargs + ): + super(GitHubActionConfiguration, self).__init__(**kwargs) + self.code_configuration = code_configuration + self.container_configuration = container_configuration + self.is_linux = is_linux + self.generate_workflow_file = generate_workflow_file + + +class GitHubActionContainerConfiguration(msrest.serialization.Model): + """The GitHub action container configuration. + + :param server_url: The server URL for the container registry where the build will be hosted. + :type server_url: str + :param image_name: The image name for the build. + :type image_name: str + :param username: The username used to upload the image to the container registry. + :type username: str + :param password: The password used to upload the image to the container registry. + :type password: str + """ + + _attribute_map = { + 'server_url': {'key': 'serverUrl', 'type': 'str'}, + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + *, + server_url: Optional[str] = None, + image_name: Optional[str] = None, + username: Optional[str] = None, + password: Optional[str] = None, + **kwargs + ): + super(GitHubActionContainerConfiguration, self).__init__(**kwargs) + self.server_url = server_url + self.image_name = image_name + self.username = username + self.password = password + + +class GitHubActionWebAppStackSettings(msrest.serialization.Model): + """GitHub Actions Web App stack settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar is_supported: :code:`true` if GitHub Actions is supported for the stack; + otherwise, :code:`false`. + :vartype is_supported: bool + :ivar supported_version: The minor version that is supported for GitHub Actions. + :vartype supported_version: str + """ + + _validation = { + 'is_supported': {'readonly': True}, + 'supported_version': {'readonly': True}, + } + + _attribute_map = { + 'is_supported': {'key': 'isSupported', 'type': 'bool'}, + 'supported_version': {'key': 'supportedVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GitHubActionWebAppStackSettings, self).__init__(**kwargs) + self.is_supported = None + self.supported_version = None + + +class GlobalCsmSkuDescription(msrest.serialization.Model): + """A Global SKU Description. + + :param name: Name of the resource SKU. + :type name: str + :param tier: Service Tier of the resource SKU. + :type tier: str + :param size: Size specifier of the resource SKU. + :type size: str + :param family: Family code of the resource SKU. + :type family: str + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2020_12_01.models.SkuCapacity + :param locations: Locations of the SKU. + :type locations: list[str] + :param capabilities: Capabilities of the SKU, e.g., is traffic manager enabled?. + :type capabilities: list[~azure.mgmt.web.v2020_12_01.models.Capability] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + tier: Optional[str] = None, + size: Optional[str] = None, + family: Optional[str] = None, + capacity: Optional["SkuCapacity"] = None, + locations: Optional[List[str]] = None, + capabilities: Optional[List["Capability"]] = None, + **kwargs + ): + super(GlobalCsmSkuDescription, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + self.locations = locations + self.capabilities = capabilities + + +class GlobalValidation(ProxyOnlyResource): + """GlobalValidation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param require_authentication: + :type require_authentication: bool + :param unauthenticated_client_action: Possible values include: "RedirectToLoginPage", + "AllowAnonymous", "Return401", "Return403". + :type unauthenticated_client_action: str or + ~azure.mgmt.web.v2020_12_01.models.UnauthenticatedClientActionV2 + :param redirect_to_provider: + :type redirect_to_provider: str + :param excluded_paths: + :type excluded_paths: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'require_authentication': {'key': 'properties.requireAuthentication', 'type': 'bool'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'str'}, + 'redirect_to_provider': {'key': 'properties.redirectToProvider', 'type': 'str'}, + 'excluded_paths': {'key': 'properties.excludedPaths', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + require_authentication: Optional[bool] = None, + unauthenticated_client_action: Optional[Union[str, "UnauthenticatedClientActionV2"]] = None, + redirect_to_provider: Optional[str] = None, + excluded_paths: Optional[List[str]] = None, + **kwargs + ): + super(GlobalValidation, self).__init__(kind=kind, **kwargs) + self.require_authentication = require_authentication + self.unauthenticated_client_action = unauthenticated_client_action + self.redirect_to_provider = redirect_to_provider + self.excluded_paths = excluded_paths + + +class Google(ProxyOnlyResource): + """Google. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.LoginScopes + :param validation: + :type validation: ~azure.mgmt.web.v2020_12_01.models.AllowedAudiencesValidation + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'ClientRegistration'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + 'validation': {'key': 'properties.validation', 'type': 'AllowedAudiencesValidation'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + registration: Optional["ClientRegistration"] = None, + login: Optional["LoginScopes"] = None, + validation: Optional["AllowedAudiencesValidation"] = None, + **kwargs + ): + super(Google, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + self.validation = validation + + +class HandlerMapping(msrest.serialization.Model): + """The IIS handler mappings used to define which handler processes HTTP requests with certain extension. +For example, it is used to configure php-cgi.exe process to handle all HTTP requests with *.php extension. + + :param extension: Requests with this extension will be handled using the specified FastCGI + application. + :type extension: str + :param script_processor: The absolute path to the FastCGI application. + :type script_processor: str + :param arguments: Command-line arguments to be passed to the script processor. + :type arguments: str + """ + + _attribute_map = { + 'extension': {'key': 'extension', 'type': 'str'}, + 'script_processor': {'key': 'scriptProcessor', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': 'str'}, + } + + def __init__( + self, + *, + extension: Optional[str] = None, + script_processor: Optional[str] = None, + arguments: Optional[str] = None, + **kwargs + ): + super(HandlerMapping, self).__init__(**kwargs) + self.extension = extension + self.script_processor = script_processor + self.arguments = arguments + + +class HostingEnvironmentDeploymentInfo(msrest.serialization.Model): + """Information needed to create resources on an App Service Environment. + + :param name: Name of the App Service Environment. + :type name: str + :param location: Location of the App Service Environment. + :type location: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + location: Optional[str] = None, + **kwargs + ): + super(HostingEnvironmentDeploymentInfo, self).__init__(**kwargs) + self.name = name + self.location = location + + +class HostingEnvironmentDiagnostics(msrest.serialization.Model): + """Diagnostics for an App Service Environment. + + :param name: Name/identifier of the diagnostics. + :type name: str + :param diagnostics_output: Diagnostics output. + :type diagnostics_output: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'diagnostics_output': {'key': 'diagnosticsOutput', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + diagnostics_output: Optional[str] = None, + **kwargs + ): + super(HostingEnvironmentDiagnostics, self).__init__(**kwargs) + self.name = name + self.diagnostics_output = diagnostics_output + + +class HostingEnvironmentProfile(msrest.serialization.Model): + """Specification for an App Service Environment to use for this resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID of the App Service Environment. + :type id: str + :ivar name: Name of the App Service Environment. + :vartype name: str + :ivar type: Resource type of the App Service Environment. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(HostingEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class HostKeys(msrest.serialization.Model): + """Functions host level keys. + + :param master_key: Secret key. + :type master_key: str + :param function_keys: Host level function keys. + :type function_keys: dict[str, str] + :param system_keys: System keys. + :type system_keys: dict[str, str] + """ + + _attribute_map = { + 'master_key': {'key': 'masterKey', 'type': 'str'}, + 'function_keys': {'key': 'functionKeys', 'type': '{str}'}, + 'system_keys': {'key': 'systemKeys', 'type': '{str}'}, + } + + def __init__( + self, + *, + master_key: Optional[str] = None, + function_keys: Optional[Dict[str, str]] = None, + system_keys: Optional[Dict[str, str]] = None, + **kwargs + ): + super(HostKeys, self).__init__(**kwargs) + self.master_key = master_key + self.function_keys = function_keys + self.system_keys = system_keys + + +class HostName(msrest.serialization.Model): + """Details of a hostname derived from a domain. + + :param name: Name of the hostname. + :type name: str + :param site_names: List of apps the hostname is assigned to. This list will have more than one + app only if the hostname is pointing to a Traffic Manager. + :type site_names: list[str] + :param azure_resource_name: Name of the Azure resource the hostname is assigned to. If it is + assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the + app name. + :type azure_resource_name: str + :param azure_resource_type: Type of the Azure resource the hostname is assigned to. Possible + values include: "Website", "TrafficManager". + :type azure_resource_type: str or ~azure.mgmt.web.v2020_12_01.models.AzureResourceType + :param custom_host_name_dns_record_type: Type of the DNS record. Possible values include: + "CName", "A". + :type custom_host_name_dns_record_type: str or + ~azure.mgmt.web.v2020_12_01.models.CustomHostNameDnsRecordType + :param host_name_type: Type of the hostname. Possible values include: "Verified", "Managed". + :type host_name_type: str or ~azure.mgmt.web.v2020_12_01.models.HostNameType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'site_names': {'key': 'siteNames', 'type': '[str]'}, + 'azure_resource_name': {'key': 'azureResourceName', 'type': 'str'}, + 'azure_resource_type': {'key': 'azureResourceType', 'type': 'str'}, + 'custom_host_name_dns_record_type': {'key': 'customHostNameDnsRecordType', 'type': 'str'}, + 'host_name_type': {'key': 'hostNameType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + site_names: Optional[List[str]] = None, + azure_resource_name: Optional[str] = None, + azure_resource_type: Optional[Union[str, "AzureResourceType"]] = None, + custom_host_name_dns_record_type: Optional[Union[str, "CustomHostNameDnsRecordType"]] = None, + host_name_type: Optional[Union[str, "HostNameType"]] = None, + **kwargs + ): + super(HostName, self).__init__(**kwargs) + self.name = name + self.site_names = site_names + self.azure_resource_name = azure_resource_name + self.azure_resource_type = azure_resource_type + self.custom_host_name_dns_record_type = custom_host_name_dns_record_type + self.host_name_type = host_name_type + + +class HostNameBinding(ProxyOnlyResource): + """A hostname binding object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param site_name: App Service app name. + :type site_name: str + :param domain_id: Fully qualified ARM domain resource URI. + :type domain_id: str + :param azure_resource_name: Azure resource name. + :type azure_resource_name: str + :param azure_resource_type: Azure resource type. Possible values include: "Website", + "TrafficManager". + :type azure_resource_type: str or ~azure.mgmt.web.v2020_12_01.models.AzureResourceType + :param custom_host_name_dns_record_type: Custom DNS record type. Possible values include: + "CName", "A". + :type custom_host_name_dns_record_type: str or + ~azure.mgmt.web.v2020_12_01.models.CustomHostNameDnsRecordType + :param host_name_type: Hostname type. Possible values include: "Verified", "Managed". + :type host_name_type: str or ~azure.mgmt.web.v2020_12_01.models.HostNameType + :param ssl_state: SSL type. Possible values include: "Disabled", "SniEnabled", + "IpBasedEnabled". + :type ssl_state: str or ~azure.mgmt.web.v2020_12_01.models.SslState + :param thumbprint: SSL certificate thumbprint. + :type thumbprint: str + :ivar virtual_ip: Virtual IP address assigned to the hostname if IP based SSL is enabled. + :vartype virtual_ip: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_ip': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'site_name': {'key': 'properties.siteName', 'type': 'str'}, + 'domain_id': {'key': 'properties.domainId', 'type': 'str'}, + 'azure_resource_name': {'key': 'properties.azureResourceName', 'type': 'str'}, + 'azure_resource_type': {'key': 'properties.azureResourceType', 'type': 'str'}, + 'custom_host_name_dns_record_type': {'key': 'properties.customHostNameDnsRecordType', 'type': 'str'}, + 'host_name_type': {'key': 'properties.hostNameType', 'type': 'str'}, + 'ssl_state': {'key': 'properties.sslState', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + site_name: Optional[str] = None, + domain_id: Optional[str] = None, + azure_resource_name: Optional[str] = None, + azure_resource_type: Optional[Union[str, "AzureResourceType"]] = None, + custom_host_name_dns_record_type: Optional[Union[str, "CustomHostNameDnsRecordType"]] = None, + host_name_type: Optional[Union[str, "HostNameType"]] = None, + ssl_state: Optional[Union[str, "SslState"]] = None, + thumbprint: Optional[str] = None, + **kwargs + ): + super(HostNameBinding, self).__init__(kind=kind, **kwargs) + self.site_name = site_name + self.domain_id = domain_id + self.azure_resource_name = azure_resource_name + self.azure_resource_type = azure_resource_type + self.custom_host_name_dns_record_type = custom_host_name_dns_record_type + self.host_name_type = host_name_type + self.ssl_state = ssl_state + self.thumbprint = thumbprint + self.virtual_ip = None + + +class HostNameBindingCollection(msrest.serialization.Model): + """Collection of hostname bindings. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.HostNameBinding] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HostNameBinding]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["HostNameBinding"], + **kwargs + ): + super(HostNameBindingCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class HostNameSslState(msrest.serialization.Model): + """SSL-enabled hostname. + + :param name: Hostname. + :type name: str + :param ssl_state: SSL type. Possible values include: "Disabled", "SniEnabled", + "IpBasedEnabled". + :type ssl_state: str or ~azure.mgmt.web.v2020_12_01.models.SslState + :param virtual_ip: Virtual IP address assigned to the hostname if IP based SSL is enabled. + :type virtual_ip: str + :param thumbprint: SSL certificate thumbprint. + :type thumbprint: str + :param to_update: Set to :code:`true` to update existing hostname. + :type to_update: bool + :param host_type: Indicates whether the hostname is a standard or repository hostname. Possible + values include: "Standard", "Repository". + :type host_type: str or ~azure.mgmt.web.v2020_12_01.models.HostType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'ssl_state': {'key': 'sslState', 'type': 'str'}, + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + ssl_state: Optional[Union[str, "SslState"]] = None, + virtual_ip: Optional[str] = None, + thumbprint: Optional[str] = None, + to_update: Optional[bool] = None, + host_type: Optional[Union[str, "HostType"]] = None, + **kwargs + ): + super(HostNameSslState, self).__init__(**kwargs) + self.name = name + self.ssl_state = ssl_state + self.virtual_ip = virtual_ip + self.thumbprint = thumbprint + self.to_update = to_update + self.host_type = host_type + + +class HttpLogsConfig(msrest.serialization.Model): + """Http logs configuration. + + :param file_system: Http logs to file system configuration. + :type file_system: ~azure.mgmt.web.v2020_12_01.models.FileSystemHttpLogsConfig + :param azure_blob_storage: Http logs to azure blob storage configuration. + :type azure_blob_storage: ~azure.mgmt.web.v2020_12_01.models.AzureBlobStorageHttpLogsConfig + """ + + _attribute_map = { + 'file_system': {'key': 'fileSystem', 'type': 'FileSystemHttpLogsConfig'}, + 'azure_blob_storage': {'key': 'azureBlobStorage', 'type': 'AzureBlobStorageHttpLogsConfig'}, + } + + def __init__( + self, + *, + file_system: Optional["FileSystemHttpLogsConfig"] = None, + azure_blob_storage: Optional["AzureBlobStorageHttpLogsConfig"] = None, + **kwargs + ): + super(HttpLogsConfig, self).__init__(**kwargs) + self.file_system = file_system + self.azure_blob_storage = azure_blob_storage + + +class HttpSettings(ProxyOnlyResource): + """HttpSettings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param require_https: + :type require_https: bool + :param routes: + :type routes: ~azure.mgmt.web.v2020_12_01.models.HttpSettingsRoutes + :param forward_proxy: + :type forward_proxy: ~azure.mgmt.web.v2020_12_01.models.ForwardProxy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'require_https': {'key': 'properties.requireHttps', 'type': 'bool'}, + 'routes': {'key': 'properties.routes', 'type': 'HttpSettingsRoutes'}, + 'forward_proxy': {'key': 'properties.forwardProxy', 'type': 'ForwardProxy'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + require_https: Optional[bool] = None, + routes: Optional["HttpSettingsRoutes"] = None, + forward_proxy: Optional["ForwardProxy"] = None, + **kwargs + ): + super(HttpSettings, self).__init__(kind=kind, **kwargs) + self.require_https = require_https + self.routes = routes + self.forward_proxy = forward_proxy + + +class HttpSettingsRoutes(ProxyOnlyResource): + """HttpSettingsRoutes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param api_prefix: + :type api_prefix: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'api_prefix': {'key': 'properties.apiPrefix', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + api_prefix: Optional[str] = None, + **kwargs + ): + super(HttpSettingsRoutes, self).__init__(kind=kind, **kwargs) + self.api_prefix = api_prefix + + +class HybridConnection(ProxyOnlyResource): + """Hybrid Connection contract. This is used to configure a Hybrid Connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param service_bus_namespace: The name of the Service Bus namespace. + :type service_bus_namespace: str + :param relay_name: The name of the Service Bus relay. + :type relay_name: str + :param relay_arm_uri: The ARM URI to the Service Bus relay. + :type relay_arm_uri: str + :param hostname: The hostname of the endpoint. + :type hostname: str + :param port: The port of the endpoint. + :type port: int + :param send_key_name: The name of the Service Bus key which has Send permissions. This is used + to authenticate to Service Bus. + :type send_key_name: str + :param send_key_value: The value of the Service Bus key. This is used to authenticate to + Service Bus. In ARM this key will not be returned + normally, use the POST /listKeys API instead. + :type send_key_value: str + :param service_bus_suffix: The suffix for the service bus endpoint. By default this is + .servicebus.windows.net. + :type service_bus_suffix: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_bus_namespace': {'key': 'properties.serviceBusNamespace', 'type': 'str'}, + 'relay_name': {'key': 'properties.relayName', 'type': 'str'}, + 'relay_arm_uri': {'key': 'properties.relayArmUri', 'type': 'str'}, + 'hostname': {'key': 'properties.hostname', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'send_key_name': {'key': 'properties.sendKeyName', 'type': 'str'}, + 'send_key_value': {'key': 'properties.sendKeyValue', 'type': 'str'}, + 'service_bus_suffix': {'key': 'properties.serviceBusSuffix', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + service_bus_namespace: Optional[str] = None, + relay_name: Optional[str] = None, + relay_arm_uri: Optional[str] = None, + hostname: Optional[str] = None, + port: Optional[int] = None, + send_key_name: Optional[str] = None, + send_key_value: Optional[str] = None, + service_bus_suffix: Optional[str] = None, + **kwargs + ): + super(HybridConnection, self).__init__(kind=kind, **kwargs) + self.service_bus_namespace = service_bus_namespace + self.relay_name = relay_name + self.relay_arm_uri = relay_arm_uri + self.hostname = hostname + self.port = port + self.send_key_name = send_key_name + self.send_key_value = send_key_value + self.service_bus_suffix = service_bus_suffix + + +class HybridConnectionCollection(msrest.serialization.Model): + """Collection of hostname bindings. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.HybridConnection] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HybridConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["HybridConnection"], + **kwargs + ): + super(HybridConnectionCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class HybridConnectionKey(ProxyOnlyResource): + """Hybrid Connection key contract. This has the send key name and value for a Hybrid Connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar send_key_name: The name of the send key. + :vartype send_key_name: str + :ivar send_key_value: The value of the send key. + :vartype send_key_value: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'send_key_name': {'readonly': True}, + 'send_key_value': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'send_key_name': {'key': 'properties.sendKeyName', 'type': 'str'}, + 'send_key_value': {'key': 'properties.sendKeyValue', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(HybridConnectionKey, self).__init__(kind=kind, **kwargs) + self.send_key_name = None + self.send_key_value = None + + +class HybridConnectionLimits(ProxyOnlyResource): + """Hybrid Connection limits contract. This is used to return the plan limits of Hybrid Connections. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar current: The current number of Hybrid Connections. + :vartype current: int + :ivar maximum: The maximum number of Hybrid Connections allowed. + :vartype maximum: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'current': {'readonly': True}, + 'maximum': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'current': {'key': 'properties.current', 'type': 'int'}, + 'maximum': {'key': 'properties.maximum', 'type': 'int'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(HybridConnectionLimits, self).__init__(kind=kind, **kwargs) + self.current = None + self.maximum = None + + +class Identifier(ProxyOnlyResource): + """A domain specific resource identifier. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param value: String representation of the identity. + :type value: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + super(Identifier, self).__init__(kind=kind, **kwargs) + self.value = value + + +class IdentifierCollection(msrest.serialization.Model): + """Collection of identifiers. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Identifier] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Identifier]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Identifier"], + **kwargs + ): + super(IdentifierCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IdentityProviders(ProxyOnlyResource): + """IdentityProviders. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param azure_active_directory: + :type azure_active_directory: ~azure.mgmt.web.v2020_12_01.models.AzureActiveDirectory + :param facebook: + :type facebook: ~azure.mgmt.web.v2020_12_01.models.Facebook + :param git_hub: + :type git_hub: ~azure.mgmt.web.v2020_12_01.models.GitHub + :param google: + :type google: ~azure.mgmt.web.v2020_12_01.models.Google + :param legacy_microsoft_account: + :type legacy_microsoft_account: ~azure.mgmt.web.v2020_12_01.models.LegacyMicrosoftAccount + :param twitter: + :type twitter: ~azure.mgmt.web.v2020_12_01.models.Twitter + :param apple: + :type apple: ~azure.mgmt.web.v2020_12_01.models.Apple + :param azure_static_web_apps: + :type azure_static_web_apps: ~azure.mgmt.web.v2020_12_01.models.AzureStaticWebApps + :param custom_open_id_connect_providers: Dictionary of :code:``. + :type custom_open_id_connect_providers: dict[str, + ~azure.mgmt.web.v2020_12_01.models.CustomOpenIdConnectProvider] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_active_directory': {'key': 'properties.azureActiveDirectory', 'type': 'AzureActiveDirectory'}, + 'facebook': {'key': 'properties.facebook', 'type': 'Facebook'}, + 'git_hub': {'key': 'properties.gitHub', 'type': 'GitHub'}, + 'google': {'key': 'properties.google', 'type': 'Google'}, + 'legacy_microsoft_account': {'key': 'properties.legacyMicrosoftAccount', 'type': 'LegacyMicrosoftAccount'}, + 'twitter': {'key': 'properties.twitter', 'type': 'Twitter'}, + 'apple': {'key': 'properties.apple', 'type': 'Apple'}, + 'azure_static_web_apps': {'key': 'properties.azureStaticWebApps', 'type': 'AzureStaticWebApps'}, + 'custom_open_id_connect_providers': {'key': 'properties.customOpenIdConnectProviders', 'type': '{CustomOpenIdConnectProvider}'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + azure_active_directory: Optional["AzureActiveDirectory"] = None, + facebook: Optional["Facebook"] = None, + git_hub: Optional["GitHub"] = None, + google: Optional["Google"] = None, + legacy_microsoft_account: Optional["LegacyMicrosoftAccount"] = None, + twitter: Optional["Twitter"] = None, + apple: Optional["Apple"] = None, + azure_static_web_apps: Optional["AzureStaticWebApps"] = None, + custom_open_id_connect_providers: Optional[Dict[str, "CustomOpenIdConnectProvider"]] = None, + **kwargs + ): + super(IdentityProviders, self).__init__(kind=kind, **kwargs) + self.azure_active_directory = azure_active_directory + self.facebook = facebook + self.git_hub = git_hub + self.google = google + self.legacy_microsoft_account = legacy_microsoft_account + self.twitter = twitter + self.apple = apple + self.azure_static_web_apps = azure_static_web_apps + self.custom_open_id_connect_providers = custom_open_id_connect_providers + + +class InboundEnvironmentEndpoint(msrest.serialization.Model): + """The IP Addresses and Ports that require inbound network access to and within the subnet of the App Service Environment. + + :param description: Short text describing the purpose of the network traffic. + :type description: str + :param endpoints: The IP addresses that network traffic will originate from in cidr notation. + :type endpoints: list[str] + :param ports: The ports that network traffic will arrive to the App Service Environment at. + :type ports: list[str] + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[str]'}, + 'ports': {'key': 'ports', 'type': '[str]'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + endpoints: Optional[List[str]] = None, + ports: Optional[List[str]] = None, + **kwargs + ): + super(InboundEnvironmentEndpoint, self).__init__(**kwargs) + self.description = description + self.endpoints = endpoints + self.ports = ports + + +class InboundEnvironmentEndpointCollection(msrest.serialization.Model): + """Collection of Inbound Environment Endpoints. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.InboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["InboundEnvironmentEndpoint"], + **kwargs + ): + super(InboundEnvironmentEndpointCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IpSecurityRestriction(msrest.serialization.Model): + """IP security restriction on an app. + + :param ip_address: IP address the security restriction is valid for. + It can be in form of pure ipv4 address (required SubnetMask property) or + CIDR notation such as ipv4/mask (leading bit match). For CIDR, + SubnetMask property must not be specified. + :type ip_address: str + :param subnet_mask: Subnet mask for the range of IP addresses the restriction is valid for. + :type subnet_mask: str + :param vnet_subnet_resource_id: Virtual network resource id. + :type vnet_subnet_resource_id: str + :param vnet_traffic_tag: (internal) Vnet traffic tag. + :type vnet_traffic_tag: int + :param subnet_traffic_tag: (internal) Subnet traffic tag. + :type subnet_traffic_tag: int + :param action: Allow or Deny access for this IP range. + :type action: str + :param tag: Defines what this IP filter will be used for. This is to support IP filtering on + proxies. Possible values include: "Default", "XffProxy", "ServiceTag". + :type tag: str or ~azure.mgmt.web.v2020_12_01.models.IpFilterTag + :param priority: Priority of IP restriction rule. + :type priority: int + :param name: IP restriction rule name. + :type name: str + :param description: IP restriction rule description. + :type description: str + :param headers: IP restriction rule headers. + X-Forwarded-Host + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). + The matching logic is .. + + + * If the property is null or empty (default), all hosts(or lack of) are allowed. + * A value is compared using ordinal-ignore-case (excluding port number). + * Subdomain wildcards are permitted but don't match the root domain. For example, + *.contoso.com matches the subdomain foo.contoso.com + but not the root domain contoso.com or multi-level foo.bar.contoso.com + * Unicode host names are allowed but are converted to Punycode for matching. + + X-Forwarded-For + (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). + The matching logic is .. + + + * If the property is null or empty (default), any forwarded-for chains (or lack of) are + allowed. + * If any address (excluding port number) in the chain (comma separated) matches the CIDR + defined by the property. + + X-Azure-FDID and X-FD-HealthProbe. + The matching logic is exact match. + :type headers: dict[str, list[str]] + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, + 'vnet_subnet_resource_id': {'key': 'vnetSubnetResourceId', 'type': 'str'}, + 'vnet_traffic_tag': {'key': 'vnetTrafficTag', 'type': 'int'}, + 'subnet_traffic_tag': {'key': 'subnetTrafficTag', 'type': 'int'}, + 'action': {'key': 'action', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + } + + def __init__( + self, + *, + ip_address: Optional[str] = None, + subnet_mask: Optional[str] = None, + vnet_subnet_resource_id: Optional[str] = None, + vnet_traffic_tag: Optional[int] = None, + subnet_traffic_tag: Optional[int] = None, + action: Optional[str] = None, + tag: Optional[Union[str, "IpFilterTag"]] = None, + priority: Optional[int] = None, + name: Optional[str] = None, + description: Optional[str] = None, + headers: Optional[Dict[str, List[str]]] = None, + **kwargs + ): + super(IpSecurityRestriction, self).__init__(**kwargs) + self.ip_address = ip_address + self.subnet_mask = subnet_mask + self.vnet_subnet_resource_id = vnet_subnet_resource_id + self.vnet_traffic_tag = vnet_traffic_tag + self.subnet_traffic_tag = subnet_traffic_tag + self.action = action + self.tag = tag + self.priority = priority + self.name = name + self.description = description + self.headers = headers + + +class JwtClaimChecks(ProxyOnlyResource): + """JwtClaimChecks. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param allowed_groups: + :type allowed_groups: list[str] + :param allowed_client_applications: + :type allowed_client_applications: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allowed_groups': {'key': 'properties.allowedGroups', 'type': '[str]'}, + 'allowed_client_applications': {'key': 'properties.allowedClientApplications', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + allowed_groups: Optional[List[str]] = None, + allowed_client_applications: Optional[List[str]] = None, + **kwargs + ): + super(JwtClaimChecks, self).__init__(kind=kind, **kwargs) + self.allowed_groups = allowed_groups + self.allowed_client_applications = allowed_client_applications + + +class KeyInfo(msrest.serialization.Model): + """Function key info. + + :param name: Key name. + :type name: str + :param value: Key value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + super(KeyInfo, self).__init__(**kwargs) + self.name = name + self.value = value + + +class KeyValuePairStringObject(msrest.serialization.Model): + """KeyValuePairStringObject. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar key: + :vartype key: str + :ivar value: Any object. + :vartype value: object + """ + + _validation = { + 'key': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyValuePairStringObject, self).__init__(**kwargs) + self.key = None + self.value = None + + +class KubeEnvironmentProfile(msrest.serialization.Model): + """Specification for a Kubernetes Environment to use for this resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID of the Kubernetes Environment. + :type id: str + :ivar name: Name of the Kubernetes Environment. + :vartype name: str + :ivar type: Resource type of the Kubernetes Environment. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(KubeEnvironmentProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class LegacyMicrosoftAccount(ProxyOnlyResource): + """LegacyMicrosoftAccount. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.ClientRegistration + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.LoginScopes + :param validation: + :type validation: ~azure.mgmt.web.v2020_12_01.models.AllowedAudiencesValidation + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'ClientRegistration'}, + 'login': {'key': 'properties.login', 'type': 'LoginScopes'}, + 'validation': {'key': 'properties.validation', 'type': 'AllowedAudiencesValidation'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + registration: Optional["ClientRegistration"] = None, + login: Optional["LoginScopes"] = None, + validation: Optional["AllowedAudiencesValidation"] = None, + **kwargs + ): + super(LegacyMicrosoftAccount, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + self.login = login + self.validation = validation + + +class LinuxJavaContainerSettings(msrest.serialization.Model): + """Linux Java Container settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar java11_runtime: Java 11 version (runtime only). + :vartype java11_runtime: str + :ivar java8_runtime: Java 8 version (runtime only). + :vartype java8_runtime: str + :ivar is_preview: :code:`true` if the stack is in preview; otherwise, + :code:`false`. + :vartype is_preview: bool + :ivar is_deprecated: :code:`true` if the stack is deprecated; otherwise, + :code:`false`. + :vartype is_deprecated: bool + :ivar is_hidden: :code:`true` if the stack should be hidden; otherwise, + :code:`false`. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: ~datetime.datetime + :ivar is_auto_update: :code:`true` if the stack version is auto-updated; + otherwise, :code:`false`. + :vartype is_auto_update: bool + :ivar is_early_access: :code:`true` if the minor version is early-access; + otherwise, :code:`false`. + :vartype is_early_access: bool + """ + + _validation = { + 'java11_runtime': {'readonly': True}, + 'java8_runtime': {'readonly': True}, + 'is_preview': {'readonly': True}, + 'is_deprecated': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'end_of_life_date': {'readonly': True}, + 'is_auto_update': {'readonly': True}, + 'is_early_access': {'readonly': True}, + } + + _attribute_map = { + 'java11_runtime': {'key': 'java11Runtime', 'type': 'str'}, + 'java8_runtime': {'key': 'java8Runtime', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'is_auto_update': {'key': 'isAutoUpdate', 'type': 'bool'}, + 'is_early_access': {'key': 'isEarlyAccess', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(LinuxJavaContainerSettings, self).__init__(**kwargs) + self.java11_runtime = None + self.java8_runtime = None + self.is_preview = None + self.is_deprecated = None + self.is_hidden = None + self.end_of_life_date = None + self.is_auto_update = None + self.is_early_access = None + + +class LocalizableString(msrest.serialization.Model): + """Localizable string object containing the name and a localized value. + + :param value: Non-localized name. + :type value: str + :param localized_value: Localized name. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + localized_value: Optional[str] = None, + **kwargs + ): + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class Login(ProxyOnlyResource): + """Login. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param routes: + :type routes: ~azure.mgmt.web.v2020_12_01.models.LoginRoutes + :param token_store: + :type token_store: ~azure.mgmt.web.v2020_12_01.models.TokenStore + :param preserve_url_fragments_for_logins: + :type preserve_url_fragments_for_logins: bool + :param allowed_external_redirect_urls: + :type allowed_external_redirect_urls: list[str] + :param cookie_expiration: + :type cookie_expiration: ~azure.mgmt.web.v2020_12_01.models.CookieExpiration + :param nonce: + :type nonce: ~azure.mgmt.web.v2020_12_01.models.Nonce + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': 'LoginRoutes'}, + 'token_store': {'key': 'properties.tokenStore', 'type': 'TokenStore'}, + 'preserve_url_fragments_for_logins': {'key': 'properties.preserveUrlFragmentsForLogins', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'cookie_expiration': {'key': 'properties.cookieExpiration', 'type': 'CookieExpiration'}, + 'nonce': {'key': 'properties.nonce', 'type': 'Nonce'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + routes: Optional["LoginRoutes"] = None, + token_store: Optional["TokenStore"] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + allowed_external_redirect_urls: Optional[List[str]] = None, + cookie_expiration: Optional["CookieExpiration"] = None, + nonce: Optional["Nonce"] = None, + **kwargs + ): + super(Login, self).__init__(kind=kind, **kwargs) + self.routes = routes + self.token_store = token_store + self.preserve_url_fragments_for_logins = preserve_url_fragments_for_logins + self.allowed_external_redirect_urls = allowed_external_redirect_urls + self.cookie_expiration = cookie_expiration + self.nonce = nonce + + +class LoginRoutes(ProxyOnlyResource): + """LoginRoutes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param logout_endpoint: + :type logout_endpoint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'logout_endpoint': {'key': 'properties.logoutEndpoint', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + logout_endpoint: Optional[str] = None, + **kwargs + ): + super(LoginRoutes, self).__init__(kind=kind, **kwargs) + self.logout_endpoint = logout_endpoint + + +class LoginScopes(ProxyOnlyResource): + """LoginScopes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param scopes: + :type scopes: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + scopes: Optional[List[str]] = None, + **kwargs + ): + super(LoginScopes, self).__init__(kind=kind, **kwargs) + self.scopes = scopes + + +class LogSpecification(msrest.serialization.Model): + """Log Definition of a single resource metric. + + :param name: + :type name: str + :param display_name: + :type display_name: str + :param blob_duration: + :type blob_duration: str + :param log_filter_pattern: + :type log_filter_pattern: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'log_filter_pattern': {'key': 'logFilterPattern', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + blob_duration: Optional[str] = None, + log_filter_pattern: Optional[str] = None, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + self.log_filter_pattern = log_filter_pattern + + +class ManagedServiceIdentity(msrest.serialization.Model): + """Managed service identity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: Type of managed service identity. Possible values include: "SystemAssigned", + "UserAssigned", "SystemAssigned, UserAssigned", "None". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentityType + :ivar tenant_id: Tenant of managed service identity. + :vartype tenant_id: str + :ivar principal_id: Principal Id of managed service identity. + :vartype principal_id: str + :param user_assigned_identities: The list of user assigned identities associated with the + resource. The user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + :type user_assigned_identities: dict[str, + ~azure.mgmt.web.v2020_12_01.models.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties}'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ManagedServiceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None, + **kwargs + ): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + self.user_assigned_identities = user_assigned_identities + + +class MetricAvailability(msrest.serialization.Model): + """Retention policy of a resource metric. + + :param time_grain: + :type time_grain: str + :param blob_duration: + :type blob_duration: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + time_grain: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs + ): + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.blob_duration = blob_duration + + +class MetricSpecification(msrest.serialization.Model): + """Definition of a single resource metric. + + :param name: + :type name: str + :param display_name: + :type display_name: str + :param display_description: + :type display_description: str + :param unit: + :type unit: str + :param aggregation_type: + :type aggregation_type: str + :param supports_instance_level_aggregation: + :type supports_instance_level_aggregation: bool + :param enable_regional_mdm_account: + :type enable_regional_mdm_account: bool + :param source_mdm_account: + :type source_mdm_account: str + :param source_mdm_namespace: + :type source_mdm_namespace: str + :param metric_filter_pattern: + :type metric_filter_pattern: str + :param fill_gap_with_zero: + :type fill_gap_with_zero: bool + :param is_internal: + :type is_internal: bool + :param dimensions: + :type dimensions: list[~azure.mgmt.web.v2020_12_01.models.Dimension] + :param category: + :type category: str + :param availabilities: + :type availabilities: list[~azure.mgmt.web.v2020_12_01.models.MetricAvailability] + :param supported_time_grain_types: + :type supported_time_grain_types: list[str] + :param supported_aggregation_types: + :type supported_aggregation_types: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supports_instance_level_aggregation': {'key': 'supportsInstanceLevelAggregation', 'type': 'bool'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'is_internal': {'key': 'isInternal', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'category': {'key': 'category', 'type': 'str'}, + 'availabilities': {'key': 'availabilities', 'type': '[MetricAvailability]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[str] = None, + aggregation_type: Optional[str] = None, + supports_instance_level_aggregation: Optional[bool] = None, + enable_regional_mdm_account: Optional[bool] = None, + source_mdm_account: Optional[str] = None, + source_mdm_namespace: Optional[str] = None, + metric_filter_pattern: Optional[str] = None, + fill_gap_with_zero: Optional[bool] = None, + is_internal: Optional[bool] = None, + dimensions: Optional[List["Dimension"]] = None, + category: Optional[str] = None, + availabilities: Optional[List["MetricAvailability"]] = None, + supported_time_grain_types: Optional[List[str]] = None, + supported_aggregation_types: Optional[List[str]] = None, + **kwargs + ): + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.supports_instance_level_aggregation = supports_instance_level_aggregation + self.enable_regional_mdm_account = enable_regional_mdm_account + self.source_mdm_account = source_mdm_account + self.source_mdm_namespace = source_mdm_namespace + self.metric_filter_pattern = metric_filter_pattern + self.fill_gap_with_zero = fill_gap_with_zero + self.is_internal = is_internal + self.dimensions = dimensions + self.category = category + self.availabilities = availabilities + self.supported_time_grain_types = supported_time_grain_types + self.supported_aggregation_types = supported_aggregation_types + + +class MigrateMySqlRequest(ProxyOnlyResource): + """MySQL migration request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param connection_string: Connection string to the remote MySQL database. + :type connection_string: str + :param migration_type: The type of migration operation to be done. Possible values include: + "LocalToRemote", "RemoteToLocal". + :type migration_type: str or ~azure.mgmt.web.v2020_12_01.models.MySqlMigrationType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'migration_type': {'key': 'properties.migrationType', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + connection_string: Optional[str] = None, + migration_type: Optional[Union[str, "MySqlMigrationType"]] = None, + **kwargs + ): + super(MigrateMySqlRequest, self).__init__(kind=kind, **kwargs) + self.connection_string = connection_string + self.migration_type = migration_type + + +class MigrateMySqlStatus(ProxyOnlyResource): + """MySQL migration status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar migration_operation_status: Status of the migration task. Possible values include: + "InProgress", "Failed", "Succeeded", "TimedOut", "Created". + :vartype migration_operation_status: str or ~azure.mgmt.web.v2020_12_01.models.OperationStatus + :ivar operation_id: Operation ID for the migration task. + :vartype operation_id: str + :ivar local_my_sql_enabled: True if the web app has in app MySql enabled. + :vartype local_my_sql_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'migration_operation_status': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'local_my_sql_enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'migration_operation_status': {'key': 'properties.migrationOperationStatus', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(MigrateMySqlStatus, self).__init__(kind=kind, **kwargs) + self.migration_operation_status = None + self.operation_id = None + self.local_my_sql_enabled = None + + +class MSDeploy(ProxyOnlyResource): + """MSDeploy ARM PUT information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param package_uri: Package URI. + :type package_uri: str + :param connection_string: SQL Connection String. + :type connection_string: str + :param db_type: Database Type. + :type db_type: str + :param set_parameters_xml_file_uri: URI of MSDeploy Parameters file. Must not be set if + SetParameters is used. + :type set_parameters_xml_file_uri: str + :param set_parameters: MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + :type set_parameters: dict[str, str] + :param skip_app_data: Controls whether the MSDeploy operation skips the App_Data directory. + If set to :code:`true`, the existing App_Data directory on the destination + will not be deleted, and any App_Data directory in the source will be ignored. + Setting is :code:`false` by default. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation executes. + Setting is :code:`false` by default. + :type app_offline: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'package_uri': {'key': 'properties.packageUri', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'db_type': {'key': 'properties.dbType', 'type': 'str'}, + 'set_parameters_xml_file_uri': {'key': 'properties.setParametersXmlFileUri', 'type': 'str'}, + 'set_parameters': {'key': 'properties.setParameters', 'type': '{str}'}, + 'skip_app_data': {'key': 'properties.skipAppData', 'type': 'bool'}, + 'app_offline': {'key': 'properties.appOffline', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + package_uri: Optional[str] = None, + connection_string: Optional[str] = None, + db_type: Optional[str] = None, + set_parameters_xml_file_uri: Optional[str] = None, + set_parameters: Optional[Dict[str, str]] = None, + skip_app_data: Optional[bool] = None, + app_offline: Optional[bool] = None, + **kwargs + ): + super(MSDeploy, self).__init__(kind=kind, **kwargs) + self.package_uri = package_uri + self.connection_string = connection_string + self.db_type = db_type + self.set_parameters_xml_file_uri = set_parameters_xml_file_uri + self.set_parameters = set_parameters + self.skip_app_data = skip_app_data + self.app_offline = app_offline + + +class MSDeployLog(ProxyOnlyResource): + """MSDeploy log. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar entries: List of log entry messages. + :vartype entries: list[~azure.mgmt.web.v2020_12_01.models.MSDeployLogEntry] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'entries': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entries': {'key': 'properties.entries', 'type': '[MSDeployLogEntry]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(MSDeployLog, self).__init__(kind=kind, **kwargs) + self.entries = None + + +class MSDeployLogEntry(msrest.serialization.Model): + """MSDeploy log entry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar time: Timestamp of log entry. + :vartype time: ~datetime.datetime + :ivar type: Log entry type. Possible values include: "Message", "Warning", "Error". + :vartype type: str or ~azure.mgmt.web.v2020_12_01.models.MSDeployLogEntryType + :ivar message: Log entry message. + :vartype message: str + """ + + _validation = { + 'time': {'readonly': True}, + 'type': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MSDeployLogEntry, self).__init__(**kwargs) + self.time = None + self.type = None + self.message = None + + +class MSDeployStatus(ProxyOnlyResource): + """MSDeploy ARM response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar deployer: Username of deployer. + :vartype deployer: str + :ivar provisioning_state: Provisioning state. Possible values include: "accepted", "running", + "succeeded", "failed", "canceled". + :vartype provisioning_state: str or + ~azure.mgmt.web.v2020_12_01.models.MSDeployProvisioningState + :ivar start_time: Start time of deploy operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: End time of deploy operation. + :vartype end_time: ~datetime.datetime + :ivar complete: Whether the deployment operation has completed. + :vartype complete: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'deployer': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deployer': {'key': 'properties.deployer', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'complete': {'key': 'properties.complete', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(MSDeployStatus, self).__init__(kind=kind, **kwargs) + self.deployer = None + self.provisioning_state = None + self.start_time = None + self.end_time = None + self.complete = None + + +class NameIdentifier(msrest.serialization.Model): + """Identifies an object. + + :param name: Name of the object. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(NameIdentifier, self).__init__(**kwargs) + self.name = name + + +class NameIdentifierCollection(msrest.serialization.Model): + """Collection of domain name identifiers. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.NameIdentifier] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NameIdentifier]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["NameIdentifier"], + **kwargs + ): + super(NameIdentifierCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class NameValuePair(msrest.serialization.Model): + """Name value pair. + + :param name: Pair name. + :type name: str + :param value: Pair value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + super(NameValuePair, self).__init__(**kwargs) + self.name = name + self.value = value + + +class NetworkFeatures(ProxyOnlyResource): + """Full view of network features for an app (presently VNET integration and Hybrid Connections). + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar virtual_network_name: The Virtual Network name. + :vartype virtual_network_name: str + :ivar virtual_network_connection: The Virtual Network summary view. + :vartype virtual_network_connection: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :ivar hybrid_connections: The Hybrid Connections summary view. + :vartype hybrid_connections: + list[~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity] + :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. + :vartype hybrid_connections_v2: list[~azure.mgmt.web.v2020_12_01.models.HybridConnection] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_name': {'readonly': True}, + 'virtual_network_connection': {'readonly': True}, + 'hybrid_connections': {'readonly': True}, + 'hybrid_connections_v2': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_name': {'key': 'properties.virtualNetworkName', 'type': 'str'}, + 'virtual_network_connection': {'key': 'properties.virtualNetworkConnection', 'type': 'VnetInfo'}, + 'hybrid_connections': {'key': 'properties.hybridConnections', 'type': '[RelayServiceConnectionEntity]'}, + 'hybrid_connections_v2': {'key': 'properties.hybridConnectionsV2', 'type': '[HybridConnection]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(NetworkFeatures, self).__init__(kind=kind, **kwargs) + self.virtual_network_name = None + self.virtual_network_connection = None + self.hybrid_connections = None + self.hybrid_connections_v2 = None + + +class NetworkTrace(msrest.serialization.Model): + """Network trace. + + :param path: Local file path for the captured network trace file. + :type path: str + :param status: Current status of the network trace operation, same as Operation.Status + (InProgress/Succeeded/Failed). + :type status: str + :param message: Detailed message of a network trace operation, e.g. error message in case of + failure. + :type message: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + path: Optional[str] = None, + status: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(NetworkTrace, self).__init__(**kwargs) + self.path = path + self.status = status + self.message = message + + +class Nonce(ProxyOnlyResource): + """Nonce. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param validate_nonce: + :type validate_nonce: bool + :param nonce_expiration_interval: + :type nonce_expiration_interval: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'validate_nonce': {'key': 'properties.validateNonce', 'type': 'bool'}, + 'nonce_expiration_interval': {'key': 'properties.nonceExpirationInterval', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + validate_nonce: Optional[bool] = None, + nonce_expiration_interval: Optional[str] = None, + **kwargs + ): + super(Nonce, self).__init__(kind=kind, **kwargs) + self.validate_nonce = validate_nonce + self.nonce_expiration_interval = nonce_expiration_interval + + +class OpenIdConnectClientCredential(ProxyOnlyResource): + """OpenIdConnectClientCredential. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar method: Default value: "ClientSecretPost". + :vartype method: str + :param client_secret_setting_name: + :type client_secret_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'method': {'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'method': {'key': 'properties.method', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + } + + method = "ClientSecretPost" + + def __init__( + self, + *, + kind: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + **kwargs + ): + super(OpenIdConnectClientCredential, self).__init__(kind=kind, **kwargs) + self.client_secret_setting_name = client_secret_setting_name + + +class OpenIdConnectConfig(ProxyOnlyResource): + """OpenIdConnectConfig. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param authorization_endpoint: + :type authorization_endpoint: str + :param token_endpoint: + :type token_endpoint: str + :param issuer: + :type issuer: str + :param certification_uri: + :type certification_uri: str + :param well_known_open_id_configuration: + :type well_known_open_id_configuration: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'authorization_endpoint': {'key': 'properties.authorizationEndpoint', 'type': 'str'}, + 'token_endpoint': {'key': 'properties.tokenEndpoint', 'type': 'str'}, + 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'certification_uri': {'key': 'properties.certificationUri', 'type': 'str'}, + 'well_known_open_id_configuration': {'key': 'properties.wellKnownOpenIdConfiguration', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + authorization_endpoint: Optional[str] = None, + token_endpoint: Optional[str] = None, + issuer: Optional[str] = None, + certification_uri: Optional[str] = None, + well_known_open_id_configuration: Optional[str] = None, + **kwargs + ): + super(OpenIdConnectConfig, self).__init__(kind=kind, **kwargs) + self.authorization_endpoint = authorization_endpoint + self.token_endpoint = token_endpoint + self.issuer = issuer + self.certification_uri = certification_uri + self.well_known_open_id_configuration = well_known_open_id_configuration + + +class OpenIdConnectLogin(ProxyOnlyResource): + """OpenIdConnectLogin. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param name_claim_type: + :type name_claim_type: str + :param scopes: + :type scopes: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name_claim_type': {'key': 'properties.nameClaimType', 'type': 'str'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + name_claim_type: Optional[str] = None, + scopes: Optional[List[str]] = None, + **kwargs + ): + super(OpenIdConnectLogin, self).__init__(kind=kind, **kwargs) + self.name_claim_type = name_claim_type + self.scopes = scopes + + +class OpenIdConnectRegistration(ProxyOnlyResource): + """OpenIdConnectRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param client_id: + :type client_id: str + :param client_credential: + :type client_credential: ~azure.mgmt.web.v2020_12_01.models.OpenIdConnectClientCredential + :param open_id_connect_configuration: + :type open_id_connect_configuration: ~azure.mgmt.web.v2020_12_01.models.OpenIdConnectConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_credential': {'key': 'properties.clientCredential', 'type': 'OpenIdConnectClientCredential'}, + 'open_id_connect_configuration': {'key': 'properties.openIdConnectConfiguration', 'type': 'OpenIdConnectConfig'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + client_id: Optional[str] = None, + client_credential: Optional["OpenIdConnectClientCredential"] = None, + open_id_connect_configuration: Optional["OpenIdConnectConfig"] = None, + **kwargs + ): + super(OpenIdConnectRegistration, self).__init__(kind=kind, **kwargs) + self.client_id = client_id + self.client_credential = client_credential + self.open_id_connect_configuration = open_id_connect_configuration + + +class Operation(msrest.serialization.Model): + """An operation on a resource. + + :param id: Operation ID. + :type id: str + :param name: Operation name. + :type name: str + :param status: The current status of the operation. Possible values include: "InProgress", + "Failed", "Succeeded", "TimedOut", "Created". + :type status: str or ~azure.mgmt.web.v2020_12_01.models.OperationStatus + :param errors: Any errors associate with the operation. + :type errors: list[~azure.mgmt.web.v2020_12_01.models.ErrorEntity] + :param created_time: Time when operation has started. + :type created_time: ~datetime.datetime + :param modified_time: Time when operation has been updated. + :type modified_time: ~datetime.datetime + :param expiration_time: Time when operation will expire. + :type expiration_time: ~datetime.datetime + :param geo_master_operation_id: Applicable only for stamp operation ids. + :type geo_master_operation_id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ErrorEntity]'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'modified_time': {'key': 'modifiedTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'expirationTime', 'type': 'iso-8601'}, + 'geo_master_operation_id': {'key': 'geoMasterOperationId', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + status: Optional[Union[str, "OperationStatus"]] = None, + errors: Optional[List["ErrorEntity"]] = None, + created_time: Optional[datetime.datetime] = None, + modified_time: Optional[datetime.datetime] = None, + expiration_time: Optional[datetime.datetime] = None, + geo_master_operation_id: Optional[str] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.id = id + self.name = name + self.status = status + self.errors = errors + self.created_time = created_time + self.modified_time = modified_time + self.expiration_time = expiration_time + self.geo_master_operation_id = geo_master_operation_id + + +class OutboundEnvironmentEndpoint(msrest.serialization.Model): + """Endpoints accessed for a common purpose that the App Service Environment requires outbound network access to. + + :param category: The type of service accessed by the App Service Environment, e.g., Azure + Storage, Azure SQL Database, and Azure Active Directory. + :type category: str + :param endpoints: The endpoints that the App Service Environment reaches the service at. + :type endpoints: list[~azure.mgmt.web.v2020_12_01.models.EndpointDependency] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, + } + + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[List["EndpointDependency"]] = None, + **kwargs + ): + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class OutboundEnvironmentEndpointCollection(msrest.serialization.Model): + """Collection of Outbound Environment Endpoints. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["OutboundEnvironmentEndpoint"], + **kwargs + ): + super(OutboundEnvironmentEndpointCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PerfMonCounterCollection(msrest.serialization.Model): + """Collection of performance monitor counters. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.PerfMonResponse] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PerfMonResponse]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["PerfMonResponse"], + **kwargs + ): + super(PerfMonCounterCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PerfMonResponse(msrest.serialization.Model): + """Performance monitor API response. + + :param code: The response code. + :type code: str + :param message: The message. + :type message: str + :param data: The performance monitor counters. + :type data: ~azure.mgmt.web.v2020_12_01.models.PerfMonSet + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'PerfMonSet'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + data: Optional["PerfMonSet"] = None, + **kwargs + ): + super(PerfMonResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.data = data + + +class PerfMonSample(msrest.serialization.Model): + """Performance monitor sample in a set. + + :param time: Point in time for which counter was measured. + :type time: ~datetime.datetime + :param instance_name: Name of the server on which the measurement is made. + :type instance_name: str + :param value: Value of counter at a certain time. + :type value: float + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'instance_name': {'key': 'instanceName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__( + self, + *, + time: Optional[datetime.datetime] = None, + instance_name: Optional[str] = None, + value: Optional[float] = None, + **kwargs + ): + super(PerfMonSample, self).__init__(**kwargs) + self.time = time + self.instance_name = instance_name + self.value = value + + +class PerfMonSet(msrest.serialization.Model): + """Metric information. + + :param name: Unique key name of the counter. + :type name: str + :param start_time: Start time of the period. + :type start_time: ~datetime.datetime + :param end_time: End time of the period. + :type end_time: ~datetime.datetime + :param time_grain: Presented time grain. + :type time_grain: str + :param values: Collection of workers that are active during this time. + :type values: list[~azure.mgmt.web.v2020_12_01.models.PerfMonSample] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[PerfMonSample]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + time_grain: Optional[str] = None, + values: Optional[List["PerfMonSample"]] = None, + **kwargs + ): + super(PerfMonSet, self).__init__(**kwargs) + self.name = name + self.start_time = start_time + self.end_time = end_time + self.time_grain = time_grain + self.values = values + + +class PremierAddOn(Resource): + """Premier add-on. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: Premier add on SKU. + :type sku: str + :param product: Premier add on Product. + :type product: str + :param vendor: Premier add on Vendor. + :type vendor: str + :param marketplace_publisher: Premier add on Marketplace publisher. + :type marketplace_publisher: str + :param marketplace_offer: Premier add on Marketplace offer. + :type marketplace_offer: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, + 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional[str] = None, + product: Optional[str] = None, + vendor: Optional[str] = None, + marketplace_publisher: Optional[str] = None, + marketplace_offer: Optional[str] = None, + **kwargs + ): + super(PremierAddOn, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.sku = sku + self.product = product + self.vendor = vendor + self.marketplace_publisher = marketplace_publisher + self.marketplace_offer = marketplace_offer + + +class PremierAddOnOffer(ProxyOnlyResource): + """Premier add-on offer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param sku: Premier add on SKU. + :type sku: str + :param product: Premier add on offer Product. + :type product: str + :param vendor: Premier add on offer Vendor. + :type vendor: str + :param promo_code_required: :code:`true` if promotion code is required; otherwise, + :code:`false`. + :type promo_code_required: bool + :param quota: Premier add on offer Quota. + :type quota: int + :param web_hosting_plan_restrictions: App Service plans this offer is restricted to. Possible + values include: "None", "Free", "Shared", "Basic", "Standard", "Premium". + :type web_hosting_plan_restrictions: str or + ~azure.mgmt.web.v2020_12_01.models.AppServicePlanRestrictions + :param privacy_policy_url: Privacy policy URL. + :type privacy_policy_url: str + :param legal_terms_url: Legal terms URL. + :type legal_terms_url: str + :param marketplace_publisher: Marketplace publisher. + :type marketplace_publisher: str + :param marketplace_offer: Marketplace offer. + :type marketplace_offer: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'promo_code_required': {'key': 'properties.promoCodeRequired', 'type': 'bool'}, + 'quota': {'key': 'properties.quota', 'type': 'int'}, + 'web_hosting_plan_restrictions': {'key': 'properties.webHostingPlanRestrictions', 'type': 'str'}, + 'privacy_policy_url': {'key': 'properties.privacyPolicyUrl', 'type': 'str'}, + 'legal_terms_url': {'key': 'properties.legalTermsUrl', 'type': 'str'}, + 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, + 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + sku: Optional[str] = None, + product: Optional[str] = None, + vendor: Optional[str] = None, + promo_code_required: Optional[bool] = None, + quota: Optional[int] = None, + web_hosting_plan_restrictions: Optional[Union[str, "AppServicePlanRestrictions"]] = None, + privacy_policy_url: Optional[str] = None, + legal_terms_url: Optional[str] = None, + marketplace_publisher: Optional[str] = None, + marketplace_offer: Optional[str] = None, + **kwargs + ): + super(PremierAddOnOffer, self).__init__(kind=kind, **kwargs) + self.sku = sku + self.product = product + self.vendor = vendor + self.promo_code_required = promo_code_required + self.quota = quota + self.web_hosting_plan_restrictions = web_hosting_plan_restrictions + self.privacy_policy_url = privacy_policy_url + self.legal_terms_url = legal_terms_url + self.marketplace_publisher = marketplace_publisher + self.marketplace_offer = marketplace_offer + + +class PremierAddOnOfferCollection(msrest.serialization.Model): + """Collection of premier add-on offers. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOffer] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PremierAddOnOffer]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["PremierAddOnOffer"], + **kwargs + ): + super(PremierAddOnOfferCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PremierAddOnPatchResource(ProxyOnlyResource): + """ARM resource for a PremierAddOn. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param sku: Premier add on SKU. + :type sku: str + :param product: Premier add on Product. + :type product: str + :param vendor: Premier add on Vendor. + :type vendor: str + :param marketplace_publisher: Premier add on Marketplace publisher. + :type marketplace_publisher: str + :param marketplace_offer: Premier add on Marketplace offer. + :type marketplace_offer: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, + 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + sku: Optional[str] = None, + product: Optional[str] = None, + vendor: Optional[str] = None, + marketplace_publisher: Optional[str] = None, + marketplace_offer: Optional[str] = None, + **kwargs + ): + super(PremierAddOnPatchResource, self).__init__(kind=kind, **kwargs) + self.sku = sku + self.product = product + self.vendor = vendor + self.marketplace_publisher = marketplace_publisher + self.marketplace_offer = marketplace_offer + + +class PrivateAccess(ProxyOnlyResource): + """Description of the parameters of Private Access for a Web Site. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: Whether private access is enabled or not. + :type enabled: bool + :param virtual_networks: The Virtual Networks (and subnets) allowed to access the site + privately. + :type virtual_networks: list[~azure.mgmt.web.v2020_12_01.models.PrivateAccessVirtualNetwork] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[PrivateAccessVirtualNetwork]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + virtual_networks: Optional[List["PrivateAccessVirtualNetwork"]] = None, + **kwargs + ): + super(PrivateAccess, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.virtual_networks = virtual_networks + + +class PrivateAccessSubnet(msrest.serialization.Model): + """Description of a Virtual Network subnet that is useable for private site access. + + :param name: The name of the subnet. + :type name: str + :param key: The key (ID) of the subnet. + :type key: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'int'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + key: Optional[int] = None, + **kwargs + ): + super(PrivateAccessSubnet, self).__init__(**kwargs) + self.name = name + self.key = key + + +class PrivateAccessVirtualNetwork(msrest.serialization.Model): + """Description of a Virtual Network that is useable for private site access. + + :param name: The name of the Virtual Network. + :type name: str + :param key: The key (ID) of the Virtual Network. + :type key: int + :param resource_id: The ARM uri of the Virtual Network. + :type resource_id: str + :param subnets: A List of subnets that access is allowed to on this Virtual Network. An empty + array (but not null) is interpreted to mean that all subnets are allowed within this Virtual + Network. + :type subnets: list[~azure.mgmt.web.v2020_12_01.models.PrivateAccessSubnet] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'int'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'subnets': {'key': 'subnets', 'type': '[PrivateAccessSubnet]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + key: Optional[int] = None, + resource_id: Optional[str] = None, + subnets: Optional[List["PrivateAccessSubnet"]] = None, + **kwargs + ): + super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) + self.name = name + self.key = key + self.resource_id = resource_id + self.subnets = subnets + + +class PrivateEndpointConnectionCollection(msrest.serialization.Model): + """PrivateEndpointConnectionCollection. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: + list[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RemotePrivateEndpointConnectionARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["RemotePrivateEndpointConnectionARMResource"], + **kwargs + ): + super(PrivateEndpointConnectionCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PrivateLinkConnectionApprovalRequestResource(ProxyOnlyResource): + """Private Endpoint Connection Approval ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param private_link_service_connection_state: The state of a private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkConnectionState'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + private_link_service_connection_state: Optional["PrivateLinkConnectionState"] = None, + **kwargs + ): + super(PrivateLinkConnectionApprovalRequestResource, self).__init__(kind=kind, **kwargs) + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateLinkConnectionState(msrest.serialization.Model): + """The state of a private link connection. + + :param status: Status of a private link connection. + :type status: str + :param description: Description of a private link connection. + :type description: str + :param actions_required: ActionsRequired for a private link connection. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + description: Optional[str] = None, + actions_required: Optional[str] = None, + **kwargs + ): + super(PrivateLinkConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class PrivateLinkResource(msrest.serialization.Model): + """A private link resource. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. + :type id: str + :param name: Required. Name of a private link resource. + :type name: str + :param type: Required. + :type type: str + :param properties: Required. Properties of a private link resource. + :type properties: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourceProperties + """ + + _validation = { + 'id': {'required': True}, + 'name': {'required': True}, + 'type': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + } + + def __init__( + self, + *, + id: str, + name: str, + type: str, + properties: "PrivateLinkResourceProperties", + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.properties = properties + + +class PrivateLinkResourceProperties(msrest.serialization.Model): + """Properties of a private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: GroupId of a private link resource. + :vartype group_id: str + :ivar required_members: RequiredMembers of a private link resource. + :vartype required_members: list[str] + :ivar required_zone_names: RequiredZoneNames of a private link resource. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkResourcesWrapper(msrest.serialization.Model): + """Wrapper for a collection of private link resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. + :type value: list[~azure.mgmt.web.v2020_12_01.models.PrivateLinkResource] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + *, + value: List["PrivateLinkResource"], + **kwargs + ): + super(PrivateLinkResourcesWrapper, self).__init__(**kwargs) + self.value = value + + +class ProcessInfo(ProxyOnlyResource): + """Process Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar identifier: ARM Identifier for deployment. + :vartype identifier: int + :param deployment_name: Deployment name. + :type deployment_name: str + :param href: HRef URI. + :type href: str + :param minidump: Minidump URI. + :type minidump: str + :param is_profile_running: Is profile running?. + :type is_profile_running: bool + :param is_iis_profile_running: Is the IIS Profile running?. + :type is_iis_profile_running: bool + :param iis_profile_timeout_in_seconds: IIS Profile timeout (seconds). + :type iis_profile_timeout_in_seconds: float + :param parent: Parent process. + :type parent: str + :param children: Child process list. + :type children: list[str] + :param threads: Thread list. + :type threads: list[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] + :param open_file_handles: List of open files. + :type open_file_handles: list[str] + :param modules: List of modules. + :type modules: list[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] + :param file_name: File name of this process. + :type file_name: str + :param command_line: Command line. + :type command_line: str + :param user_name: User name. + :type user_name: str + :param handle_count: Handle count. + :type handle_count: int + :param module_count: Module count. + :type module_count: int + :param thread_count: Thread count. + :type thread_count: int + :param start_time: Start time. + :type start_time: ~datetime.datetime + :param total_cpu_time: Total CPU time. + :type total_cpu_time: str + :param user_cpu_time: User CPU time. + :type user_cpu_time: str + :param privileged_cpu_time: Privileged CPU time. + :type privileged_cpu_time: str + :param working_set: Working set. + :type working_set: long + :param peak_working_set: Peak working set. + :type peak_working_set: long + :param private_memory: Private memory size. + :type private_memory: long + :param virtual_memory: Virtual memory size. + :type virtual_memory: long + :param peak_virtual_memory: Peak virtual memory usage. + :type peak_virtual_memory: long + :param paged_system_memory: Paged system memory. + :type paged_system_memory: long + :param non_paged_system_memory: Non-paged system memory. + :type non_paged_system_memory: long + :param paged_memory: Paged memory. + :type paged_memory: long + :param peak_paged_memory: Peak paged memory. + :type peak_paged_memory: long + :param time_stamp: Time stamp. + :type time_stamp: ~datetime.datetime + :param environment_variables: List of environment variables. + :type environment_variables: dict[str, str] + :param is_scm_site: Is this the SCM site?. + :type is_scm_site: bool + :param is_webjob: Is this a Web Job?. + :type is_webjob: bool + :param description: Description of process. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'int'}, + 'deployment_name': {'key': 'properties.deployment_name', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'minidump': {'key': 'properties.minidump', 'type': 'str'}, + 'is_profile_running': {'key': 'properties.is_profile_running', 'type': 'bool'}, + 'is_iis_profile_running': {'key': 'properties.is_iis_profile_running', 'type': 'bool'}, + 'iis_profile_timeout_in_seconds': {'key': 'properties.iis_profile_timeout_in_seconds', 'type': 'float'}, + 'parent': {'key': 'properties.parent', 'type': 'str'}, + 'children': {'key': 'properties.children', 'type': '[str]'}, + 'threads': {'key': 'properties.threads', 'type': '[ProcessThreadInfo]'}, + 'open_file_handles': {'key': 'properties.open_file_handles', 'type': '[str]'}, + 'modules': {'key': 'properties.modules', 'type': '[ProcessModuleInfo]'}, + 'file_name': {'key': 'properties.file_name', 'type': 'str'}, + 'command_line': {'key': 'properties.command_line', 'type': 'str'}, + 'user_name': {'key': 'properties.user_name', 'type': 'str'}, + 'handle_count': {'key': 'properties.handle_count', 'type': 'int'}, + 'module_count': {'key': 'properties.module_count', 'type': 'int'}, + 'thread_count': {'key': 'properties.thread_count', 'type': 'int'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'total_cpu_time': {'key': 'properties.total_cpu_time', 'type': 'str'}, + 'user_cpu_time': {'key': 'properties.user_cpu_time', 'type': 'str'}, + 'privileged_cpu_time': {'key': 'properties.privileged_cpu_time', 'type': 'str'}, + 'working_set': {'key': 'properties.working_set', 'type': 'long'}, + 'peak_working_set': {'key': 'properties.peak_working_set', 'type': 'long'}, + 'private_memory': {'key': 'properties.private_memory', 'type': 'long'}, + 'virtual_memory': {'key': 'properties.virtual_memory', 'type': 'long'}, + 'peak_virtual_memory': {'key': 'properties.peak_virtual_memory', 'type': 'long'}, + 'paged_system_memory': {'key': 'properties.paged_system_memory', 'type': 'long'}, + 'non_paged_system_memory': {'key': 'properties.non_paged_system_memory', 'type': 'long'}, + 'paged_memory': {'key': 'properties.paged_memory', 'type': 'long'}, + 'peak_paged_memory': {'key': 'properties.peak_paged_memory', 'type': 'long'}, + 'time_stamp': {'key': 'properties.time_stamp', 'type': 'iso-8601'}, + 'environment_variables': {'key': 'properties.environment_variables', 'type': '{str}'}, + 'is_scm_site': {'key': 'properties.is_scm_site', 'type': 'bool'}, + 'is_webjob': {'key': 'properties.is_webjob', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + deployment_name: Optional[str] = None, + href: Optional[str] = None, + minidump: Optional[str] = None, + is_profile_running: Optional[bool] = None, + is_iis_profile_running: Optional[bool] = None, + iis_profile_timeout_in_seconds: Optional[float] = None, + parent: Optional[str] = None, + children: Optional[List[str]] = None, + threads: Optional[List["ProcessThreadInfo"]] = None, + open_file_handles: Optional[List[str]] = None, + modules: Optional[List["ProcessModuleInfo"]] = None, + file_name: Optional[str] = None, + command_line: Optional[str] = None, + user_name: Optional[str] = None, + handle_count: Optional[int] = None, + module_count: Optional[int] = None, + thread_count: Optional[int] = None, + start_time: Optional[datetime.datetime] = None, + total_cpu_time: Optional[str] = None, + user_cpu_time: Optional[str] = None, + privileged_cpu_time: Optional[str] = None, + working_set: Optional[int] = None, + peak_working_set: Optional[int] = None, + private_memory: Optional[int] = None, + virtual_memory: Optional[int] = None, + peak_virtual_memory: Optional[int] = None, + paged_system_memory: Optional[int] = None, + non_paged_system_memory: Optional[int] = None, + paged_memory: Optional[int] = None, + peak_paged_memory: Optional[int] = None, + time_stamp: Optional[datetime.datetime] = None, + environment_variables: Optional[Dict[str, str]] = None, + is_scm_site: Optional[bool] = None, + is_webjob: Optional[bool] = None, + description: Optional[str] = None, + **kwargs + ): + super(ProcessInfo, self).__init__(kind=kind, **kwargs) + self.identifier = None + self.deployment_name = deployment_name + self.href = href + self.minidump = minidump + self.is_profile_running = is_profile_running + self.is_iis_profile_running = is_iis_profile_running + self.iis_profile_timeout_in_seconds = iis_profile_timeout_in_seconds + self.parent = parent + self.children = children + self.threads = threads + self.open_file_handles = open_file_handles + self.modules = modules + self.file_name = file_name + self.command_line = command_line + self.user_name = user_name + self.handle_count = handle_count + self.module_count = module_count + self.thread_count = thread_count + self.start_time = start_time + self.total_cpu_time = total_cpu_time + self.user_cpu_time = user_cpu_time + self.privileged_cpu_time = privileged_cpu_time + self.working_set = working_set + self.peak_working_set = peak_working_set + self.private_memory = private_memory + self.virtual_memory = virtual_memory + self.peak_virtual_memory = peak_virtual_memory + self.paged_system_memory = paged_system_memory + self.non_paged_system_memory = non_paged_system_memory + self.paged_memory = paged_memory + self.peak_paged_memory = peak_paged_memory + self.time_stamp = time_stamp + self.environment_variables = environment_variables + self.is_scm_site = is_scm_site + self.is_webjob = is_webjob + self.description = description + + +class ProcessInfoCollection(msrest.serialization.Model): + """Collection of Kudu process information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ProcessInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ProcessInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["ProcessInfo"], + **kwargs + ): + super(ProcessInfoCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ProcessModuleInfo(ProxyOnlyResource): + """Process Module Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param base_address: Base address. Used as module identifier in ARM resource URI. + :type base_address: str + :param file_name: File name. + :type file_name: str + :param href: HRef URI. + :type href: str + :param file_path: File path. + :type file_path: str + :param module_memory_size: Module memory size. + :type module_memory_size: int + :param file_version: File version. + :type file_version: str + :param file_description: File description. + :type file_description: str + :param product: Product name. + :type product: str + :param product_version: Product version. + :type product_version: str + :param is_debug: Is debug?. + :type is_debug: bool + :param language: Module language (locale). + :type language: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'base_address': {'key': 'properties.base_address', 'type': 'str'}, + 'file_name': {'key': 'properties.file_name', 'type': 'str'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'file_path': {'key': 'properties.file_path', 'type': 'str'}, + 'module_memory_size': {'key': 'properties.module_memory_size', 'type': 'int'}, + 'file_version': {'key': 'properties.file_version', 'type': 'str'}, + 'file_description': {'key': 'properties.file_description', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'product_version': {'key': 'properties.product_version', 'type': 'str'}, + 'is_debug': {'key': 'properties.is_debug', 'type': 'bool'}, + 'language': {'key': 'properties.language', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + base_address: Optional[str] = None, + file_name: Optional[str] = None, + href: Optional[str] = None, + file_path: Optional[str] = None, + module_memory_size: Optional[int] = None, + file_version: Optional[str] = None, + file_description: Optional[str] = None, + product: Optional[str] = None, + product_version: Optional[str] = None, + is_debug: Optional[bool] = None, + language: Optional[str] = None, + **kwargs + ): + super(ProcessModuleInfo, self).__init__(kind=kind, **kwargs) + self.base_address = base_address + self.file_name = file_name + self.href = href + self.file_path = file_path + self.module_memory_size = module_memory_size + self.file_version = file_version + self.file_description = file_description + self.product = product + self.product_version = product_version + self.is_debug = is_debug + self.language = language + + +class ProcessModuleInfoCollection(msrest.serialization.Model): + """Collection of Kudu thread information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ProcessModuleInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["ProcessModuleInfo"], + **kwargs + ): + super(ProcessModuleInfoCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ProcessThreadInfo(ProxyOnlyResource): + """Process Thread Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar identifier: Site extension ID. + :vartype identifier: int + :param href: HRef URI. + :type href: str + :param process: Process URI. + :type process: str + :param start_address: Start address. + :type start_address: str + :param current_priority: Current thread priority. + :type current_priority: int + :param priority_level: Thread priority level. + :type priority_level: str + :param base_priority: Base priority. + :type base_priority: int + :param start_time: Start time. + :type start_time: ~datetime.datetime + :param total_processor_time: Total processor time. + :type total_processor_time: str + :param user_processor_time: User processor time. + :type user_processor_time: str + :param state: Thread state. + :type state: str + :param wait_reason: Wait reason. + :type wait_reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'int'}, + 'href': {'key': 'properties.href', 'type': 'str'}, + 'process': {'key': 'properties.process', 'type': 'str'}, + 'start_address': {'key': 'properties.start_address', 'type': 'str'}, + 'current_priority': {'key': 'properties.current_priority', 'type': 'int'}, + 'priority_level': {'key': 'properties.priority_level', 'type': 'str'}, + 'base_priority': {'key': 'properties.base_priority', 'type': 'int'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'total_processor_time': {'key': 'properties.total_processor_time', 'type': 'str'}, + 'user_processor_time': {'key': 'properties.user_processor_time', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'wait_reason': {'key': 'properties.wait_reason', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + href: Optional[str] = None, + process: Optional[str] = None, + start_address: Optional[str] = None, + current_priority: Optional[int] = None, + priority_level: Optional[str] = None, + base_priority: Optional[int] = None, + start_time: Optional[datetime.datetime] = None, + total_processor_time: Optional[str] = None, + user_processor_time: Optional[str] = None, + state: Optional[str] = None, + wait_reason: Optional[str] = None, + **kwargs + ): + super(ProcessThreadInfo, self).__init__(kind=kind, **kwargs) + self.identifier = None + self.href = href + self.process = process + self.start_address = start_address + self.current_priority = current_priority + self.priority_level = priority_level + self.base_priority = base_priority + self.start_time = start_time + self.total_processor_time = total_processor_time + self.user_processor_time = user_processor_time + self.state = state + self.wait_reason = wait_reason + + +class ProcessThreadInfoCollection(msrest.serialization.Model): + """Collection of Kudu thread information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ProcessThreadInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["ProcessThreadInfo"], + **kwargs + ): + super(ProcessThreadInfoCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PublicCertificate(ProxyOnlyResource): + """Public certificate object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param blob: Public Certificate byte array. + :type blob: bytearray + :param public_certificate_location: Public Certificate Location. Possible values include: + "CurrentUserMy", "LocalMachineMy", "Unknown". + :type public_certificate_location: str or + ~azure.mgmt.web.v2020_12_01.models.PublicCertificateLocation + :ivar thumbprint: Certificate Thumbprint. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'blob': {'key': 'properties.blob', 'type': 'bytearray'}, + 'public_certificate_location': {'key': 'properties.publicCertificateLocation', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + blob: Optional[bytearray] = None, + public_certificate_location: Optional[Union[str, "PublicCertificateLocation"]] = None, + **kwargs + ): + super(PublicCertificate, self).__init__(kind=kind, **kwargs) + self.blob = blob + self.public_certificate_location = public_certificate_location + self.thumbprint = None + + +class PublicCertificateCollection(msrest.serialization.Model): + """Collection of public certificates. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.PublicCertificate] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PublicCertificate]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["PublicCertificate"], + **kwargs + ): + super(PublicCertificateCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PushSettings(ProxyOnlyResource): + """Push settings for the App. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param is_push_enabled: Gets or sets a flag indicating whether the Push endpoint is enabled. + :type is_push_enabled: bool + :param tag_whitelist_json: Gets or sets a JSON string containing a list of tags that are + whitelisted for use by the push registration endpoint. + :type tag_whitelist_json: str + :param tags_requiring_auth: Gets or sets a JSON string containing a list of tags that require + user authentication to be used in the push registration endpoint. + Tags can consist of alphanumeric characters and the following: + '_', '@', '#', '.', ':', '-'. + Validation should be performed at the PushRequestHandler. + :type tags_requiring_auth: str + :param dynamic_tags_json: Gets or sets a JSON string containing a list of dynamic tags that + will be evaluated from user claims in the push registration endpoint. + :type dynamic_tags_json: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_push_enabled': {'key': 'properties.isPushEnabled', 'type': 'bool'}, + 'tag_whitelist_json': {'key': 'properties.tagWhitelistJson', 'type': 'str'}, + 'tags_requiring_auth': {'key': 'properties.tagsRequiringAuth', 'type': 'str'}, + 'dynamic_tags_json': {'key': 'properties.dynamicTagsJson', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + is_push_enabled: Optional[bool] = None, + tag_whitelist_json: Optional[str] = None, + tags_requiring_auth: Optional[str] = None, + dynamic_tags_json: Optional[str] = None, + **kwargs + ): + super(PushSettings, self).__init__(kind=kind, **kwargs) + self.is_push_enabled = is_push_enabled + self.tag_whitelist_json = tag_whitelist_json + self.tags_requiring_auth = tags_requiring_auth + self.dynamic_tags_json = dynamic_tags_json + + +class QueryUtterancesResult(msrest.serialization.Model): + """Result for utterances query. + + :param sample_utterance: A sample utterance. + :type sample_utterance: ~azure.mgmt.web.v2020_12_01.models.SampleUtterance + :param score: Score of a sample utterance. + :type score: float + """ + + _attribute_map = { + 'sample_utterance': {'key': 'sampleUtterance', 'type': 'SampleUtterance'}, + 'score': {'key': 'score', 'type': 'float'}, + } + + def __init__( + self, + *, + sample_utterance: Optional["SampleUtterance"] = None, + score: Optional[float] = None, + **kwargs + ): + super(QueryUtterancesResult, self).__init__(**kwargs) + self.sample_utterance = sample_utterance + self.score = score + + +class QueryUtterancesResults(msrest.serialization.Model): + """Suggested utterances where the detector can be applicable. + + :param query: Search Query. + :type query: str + :param results: Array of utterance results for search query. + :type results: list[~azure.mgmt.web.v2020_12_01.models.QueryUtterancesResult] + """ + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'results': {'key': 'results', 'type': '[QueryUtterancesResult]'}, + } + + def __init__( + self, + *, + query: Optional[str] = None, + results: Optional[List["QueryUtterancesResult"]] = None, + **kwargs + ): + super(QueryUtterancesResults, self).__init__(**kwargs) + self.query = query + self.results = results + + +class RampUpRule(msrest.serialization.Model): + """Routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to gradually change routing % based on performance. + + :param action_host_name: Hostname of a slot to which the traffic will be redirected if decided + to. E.g. myapp-stage.azurewebsites.net. + :type action_host_name: str + :param reroute_percentage: Percentage of the traffic which will be redirected to + :code:`ActionHostName`. + :type reroute_percentage: float + :param change_step: In auto ramp up scenario this is the step to add/remove from + :code:`ReroutePercentage` until it reaches + \n:code:`MinReroutePercentage` or + :code:`MaxReroutePercentage`. Site metrics are checked every N minutes specified + in :code:`ChangeIntervalInMinutes`.\nCustom decision algorithm + can be provided in TiPCallback site extension which URL can be specified in + :code:`ChangeDecisionCallbackUrl`. + :type change_step: float + :param change_interval_in_minutes: Specifies interval in minutes to reevaluate + ReroutePercentage. + :type change_interval_in_minutes: int + :param min_reroute_percentage: Specifies lower boundary above which ReroutePercentage will + stay. + :type min_reroute_percentage: float + :param max_reroute_percentage: Specifies upper boundary below which ReroutePercentage will + stay. + :type max_reroute_percentage: float + :param change_decision_callback_url: Custom decision algorithm can be provided in TiPCallback + site extension which URL can be specified. See TiPCallback site extension for the scaffold and + contracts. + https://www.siteextensions.net/packages/TiPCallback/. + :type change_decision_callback_url: str + :param name: Name of the routing rule. The recommended name would be to point to the slot which + will receive the traffic in the experiment. + :type name: str + """ + + _attribute_map = { + 'action_host_name': {'key': 'actionHostName', 'type': 'str'}, + 'reroute_percentage': {'key': 'reroutePercentage', 'type': 'float'}, + 'change_step': {'key': 'changeStep', 'type': 'float'}, + 'change_interval_in_minutes': {'key': 'changeIntervalInMinutes', 'type': 'int'}, + 'min_reroute_percentage': {'key': 'minReroutePercentage', 'type': 'float'}, + 'max_reroute_percentage': {'key': 'maxReroutePercentage', 'type': 'float'}, + 'change_decision_callback_url': {'key': 'changeDecisionCallbackUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + action_host_name: Optional[str] = None, + reroute_percentage: Optional[float] = None, + change_step: Optional[float] = None, + change_interval_in_minutes: Optional[int] = None, + min_reroute_percentage: Optional[float] = None, + max_reroute_percentage: Optional[float] = None, + change_decision_callback_url: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + super(RampUpRule, self).__init__(**kwargs) + self.action_host_name = action_host_name + self.reroute_percentage = reroute_percentage + self.change_step = change_step + self.change_interval_in_minutes = change_interval_in_minutes + self.min_reroute_percentage = min_reroute_percentage + self.max_reroute_percentage = max_reroute_percentage + self.change_decision_callback_url = change_decision_callback_url + self.name = name + + +class Recommendation(ProxyOnlyResource): + """Represents a recommendation result generated by the recommendation engine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param creation_time: Timestamp when this instance was created. + :type creation_time: ~datetime.datetime + :param recommendation_id: A GUID value that each recommendation object is associated with. + :type recommendation_id: str + :param resource_id: Full ARM resource ID string that this recommendation object is associated + with. + :type resource_id: str + :param resource_scope: Name of a resource type this recommendation applies, e.g. Subscription, + ServerFarm, Site. Possible values include: "ServerFarm", "Subscription", "WebSite". + :type resource_scope: str or ~azure.mgmt.web.v2020_12_01.models.ResourceScopeType + :param rule_name: Unique name of the rule. + :type rule_name: str + :param display_name: UI friendly name of the rule (may not be unique). + :type display_name: str + :param message: Recommendation text. + :type message: str + :param level: Level indicating how critical this recommendation can impact. Possible values + include: "Critical", "Warning", "Information", "NonUrgentSuggestion". + :type level: str or ~azure.mgmt.web.v2020_12_01.models.NotificationLevel + :param channels: List of channels that this recommendation can apply. Possible values include: + "Notification", "Api", "Email", "Webhook", "All". + :type channels: str or ~azure.mgmt.web.v2020_12_01.models.Channels + :ivar category_tags: The list of category tags that this recommendation belongs to. + :vartype category_tags: list[str] + :param action_name: Name of action recommended by this object. + :type action_name: str + :param enabled: True if this recommendation is still valid (i.e. "actionable"). False if it is + invalid. + :type enabled: int + :param states: The list of states of this recommendation. If it's null then it should be + considered "Active". + :type states: list[str] + :param start_time: The beginning time in UTC of a range that the recommendation refers to. + :type start_time: ~datetime.datetime + :param end_time: The end time in UTC of a range that the recommendation refers to. + :type end_time: ~datetime.datetime + :param next_notification_time: When to notify this recommendation next in UTC. Null means that + this will never be notified anymore. + :type next_notification_time: ~datetime.datetime + :param notification_expiration_time: Date and time in UTC when this notification expires. + :type notification_expiration_time: ~datetime.datetime + :param notified_time: Last timestamp in UTC this instance was actually notified. Null means + that this recommendation hasn't been notified yet. + :type notified_time: ~datetime.datetime + :param score: A metric value measured by the rule. + :type score: float + :param is_dynamic: True if this is associated with a dynamically added rule. + :type is_dynamic: bool + :param extension_name: Extension name of the portal if exists. + :type extension_name: str + :param blade_name: Deep link to a blade on the portal. + :type blade_name: str + :param forward_link: Forward link to an external document associated with the rule. + :type forward_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category_tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'recommendation_id': {'key': 'properties.recommendationId', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'resource_scope': {'key': 'properties.resourceScope', 'type': 'str'}, + 'rule_name': {'key': 'properties.ruleName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'message': {'key': 'properties.message', 'type': 'str'}, + 'level': {'key': 'properties.level', 'type': 'str'}, + 'channels': {'key': 'properties.channels', 'type': 'str'}, + 'category_tags': {'key': 'properties.categoryTags', 'type': '[str]'}, + 'action_name': {'key': 'properties.actionName', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'int'}, + 'states': {'key': 'properties.states', 'type': '[str]'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'next_notification_time': {'key': 'properties.nextNotificationTime', 'type': 'iso-8601'}, + 'notification_expiration_time': {'key': 'properties.notificationExpirationTime', 'type': 'iso-8601'}, + 'notified_time': {'key': 'properties.notifiedTime', 'type': 'iso-8601'}, + 'score': {'key': 'properties.score', 'type': 'float'}, + 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, + 'extension_name': {'key': 'properties.extensionName', 'type': 'str'}, + 'blade_name': {'key': 'properties.bladeName', 'type': 'str'}, + 'forward_link': {'key': 'properties.forwardLink', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + creation_time: Optional[datetime.datetime] = None, + recommendation_id: Optional[str] = None, + resource_id: Optional[str] = None, + resource_scope: Optional[Union[str, "ResourceScopeType"]] = None, + rule_name: Optional[str] = None, + display_name: Optional[str] = None, + message: Optional[str] = None, + level: Optional[Union[str, "NotificationLevel"]] = None, + channels: Optional[Union[str, "Channels"]] = None, + action_name: Optional[str] = None, + enabled: Optional[int] = None, + states: Optional[List[str]] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + next_notification_time: Optional[datetime.datetime] = None, + notification_expiration_time: Optional[datetime.datetime] = None, + notified_time: Optional[datetime.datetime] = None, + score: Optional[float] = None, + is_dynamic: Optional[bool] = None, + extension_name: Optional[str] = None, + blade_name: Optional[str] = None, + forward_link: Optional[str] = None, + **kwargs + ): + super(Recommendation, self).__init__(kind=kind, **kwargs) + self.creation_time = creation_time + self.recommendation_id = recommendation_id + self.resource_id = resource_id + self.resource_scope = resource_scope + self.rule_name = rule_name + self.display_name = display_name + self.message = message + self.level = level + self.channels = channels + self.category_tags = None + self.action_name = action_name + self.enabled = enabled + self.states = states + self.start_time = start_time + self.end_time = end_time + self.next_notification_time = next_notification_time + self.notification_expiration_time = notification_expiration_time + self.notified_time = notified_time + self.score = score + self.is_dynamic = is_dynamic + self.extension_name = extension_name + self.blade_name = blade_name + self.forward_link = forward_link + + +class RecommendationCollection(msrest.serialization.Model): + """Collection of recommendations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Recommendation] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Recommendation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Recommendation"], + **kwargs + ): + super(RecommendationCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class RecommendationRule(ProxyOnlyResource): + """Represents a recommendation rule that the recommendation engine can perform. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param recommendation_name: Unique name of the rule. + :type recommendation_name: str + :param display_name: UI friendly name of the rule. + :type display_name: str + :param message: Localized name of the rule (Good for UI). + :type message: str + :param recommendation_id: Recommendation ID of an associated recommendation object tied to the + rule, if exists. + If such an object doesn't exist, it is set to null. + :type recommendation_id: str + :param description: Localized detailed description of the rule. + :type description: str + :param action_name: Name of action that is recommended by this rule in string. + :type action_name: str + :param level: Level of impact indicating how critical this rule is. Possible values include: + "Critical", "Warning", "Information", "NonUrgentSuggestion". + :type level: str or ~azure.mgmt.web.v2020_12_01.models.NotificationLevel + :param channels: List of available channels that this rule applies. Possible values include: + "Notification", "Api", "Email", "Webhook", "All". + :type channels: str or ~azure.mgmt.web.v2020_12_01.models.Channels + :ivar category_tags: The list of category tags that this recommendation rule belongs to. + :vartype category_tags: list[str] + :param is_dynamic: True if this is associated with a dynamically added rule. + :type is_dynamic: bool + :param extension_name: Extension name of the portal if exists. Applicable to dynamic rule only. + :type extension_name: str + :param blade_name: Deep link to a blade on the portal. Applicable to dynamic rule only. + :type blade_name: str + :param forward_link: Forward link to an external document associated with the rule. Applicable + to dynamic rule only. + :type forward_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category_tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'message': {'key': 'properties.message', 'type': 'str'}, + 'recommendation_id': {'key': 'properties.recommendationId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'action_name': {'key': 'properties.actionName', 'type': 'str'}, + 'level': {'key': 'properties.level', 'type': 'str'}, + 'channels': {'key': 'properties.channels', 'type': 'str'}, + 'category_tags': {'key': 'properties.categoryTags', 'type': '[str]'}, + 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, + 'extension_name': {'key': 'properties.extensionName', 'type': 'str'}, + 'blade_name': {'key': 'properties.bladeName', 'type': 'str'}, + 'forward_link': {'key': 'properties.forwardLink', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + recommendation_name: Optional[str] = None, + display_name: Optional[str] = None, + message: Optional[str] = None, + recommendation_id: Optional[str] = None, + description: Optional[str] = None, + action_name: Optional[str] = None, + level: Optional[Union[str, "NotificationLevel"]] = None, + channels: Optional[Union[str, "Channels"]] = None, + is_dynamic: Optional[bool] = None, + extension_name: Optional[str] = None, + blade_name: Optional[str] = None, + forward_link: Optional[str] = None, + **kwargs + ): + super(RecommendationRule, self).__init__(kind=kind, **kwargs) + self.recommendation_name = recommendation_name + self.display_name = display_name + self.message = message + self.recommendation_id = recommendation_id + self.description = description + self.action_name = action_name + self.level = level + self.channels = channels + self.category_tags = None + self.is_dynamic = is_dynamic + self.extension_name = extension_name + self.blade_name = blade_name + self.forward_link = forward_link + + +class ReissueCertificateOrderRequest(ProxyOnlyResource): + """Class representing certificate reissue request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param key_size: Certificate Key Size. + :type key_size: int + :param delay_existing_revoke_in_hours: Delay in hours to revoke existing certificate after the + new certificate is issued. + :type delay_existing_revoke_in_hours: int + :param csr: Csr to be used for re-key operation. + :type csr: str + :param is_private_key_external: Should we change the ASC type (from managed private key to + external private key and vice versa). + :type is_private_key_external: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'delay_existing_revoke_in_hours': {'key': 'properties.delayExistingRevokeInHours', 'type': 'int'}, + 'csr': {'key': 'properties.csr', 'type': 'str'}, + 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + key_size: Optional[int] = None, + delay_existing_revoke_in_hours: Optional[int] = None, + csr: Optional[str] = None, + is_private_key_external: Optional[bool] = None, + **kwargs + ): + super(ReissueCertificateOrderRequest, self).__init__(kind=kind, **kwargs) + self.key_size = key_size + self.delay_existing_revoke_in_hours = delay_existing_revoke_in_hours + self.csr = csr + self.is_private_key_external = is_private_key_external + + +class RelayServiceConnectionEntity(ProxyOnlyResource): + """Hybrid Connection for an App Service app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param entity_name: + :type entity_name: str + :param entity_connection_string: + :type entity_connection_string: str + :param resource_type: + :type resource_type: str + :param resource_connection_string: + :type resource_connection_string: str + :param hostname: + :type hostname: str + :param port: + :type port: int + :param biztalk_uri: + :type biztalk_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entity_name': {'key': 'properties.entityName', 'type': 'str'}, + 'entity_connection_string': {'key': 'properties.entityConnectionString', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'resource_connection_string': {'key': 'properties.resourceConnectionString', 'type': 'str'}, + 'hostname': {'key': 'properties.hostname', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'biztalk_uri': {'key': 'properties.biztalkUri', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + entity_name: Optional[str] = None, + entity_connection_string: Optional[str] = None, + resource_type: Optional[str] = None, + resource_connection_string: Optional[str] = None, + hostname: Optional[str] = None, + port: Optional[int] = None, + biztalk_uri: Optional[str] = None, + **kwargs + ): + super(RelayServiceConnectionEntity, self).__init__(kind=kind, **kwargs) + self.entity_name = entity_name + self.entity_connection_string = entity_connection_string + self.resource_type = resource_type + self.resource_connection_string = resource_connection_string + self.hostname = hostname + self.port = port + self.biztalk_uri = biztalk_uri + + +class RemotePrivateEndpointConnectionARMResource(ProxyOnlyResource): + """Remote Private Endpoint Connection ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: + :vartype provisioning_state: str + :param private_endpoint: PrivateEndpoint of a remote private endpoint connection. + :type private_endpoint: ~azure.mgmt.web.v2020_12_01.models.ArmIdWrapper + :param private_link_service_connection_state: The state of a private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionState + :param ip_addresses: Private IPAddresses mapped to the remote private endpoint. + :type ip_addresses: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'ArmIdWrapper'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkConnectionState'}, + 'ip_addresses': {'key': 'properties.ipAddresses', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + private_endpoint: Optional["ArmIdWrapper"] = None, + private_link_service_connection_state: Optional["PrivateLinkConnectionState"] = None, + ip_addresses: Optional[List[str]] = None, + **kwargs + ): + super(RemotePrivateEndpointConnectionARMResource, self).__init__(kind=kind, **kwargs) + self.provisioning_state = None + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.ip_addresses = ip_addresses + + +class Rendering(msrest.serialization.Model): + """Instructions for rendering the data. + + :param type: Rendering Type. Possible values include: "NoGraph", "Table", "TimeSeries", + "TimeSeriesPerInstance", "PieChart", "DataSummary", "Email", "Insights", "DynamicInsight", + "Markdown", "Detector", "DropDown", "Card", "Solution", "Guage", "Form", "ChangeSets", + "ChangeAnalysisOnboarding", "ChangesView", "AppInsight", "DependencyGraph", "DownTime", + "SummaryCard", "SearchComponent", "AppInsightEnablement". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.RenderingType + :param title: Title of data. + :type title: str + :param description: Description of the data that will help it be interpreted. + :type description: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "RenderingType"]] = None, + title: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(Rendering, self).__init__(**kwargs) + self.type = type + self.title = title + self.description = description + + +class RenewCertificateOrderRequest(ProxyOnlyResource): + """Class representing certificate renew request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param key_size: Certificate Key Size. + :type key_size: int + :param csr: Csr to be used for re-key operation. + :type csr: str + :param is_private_key_external: Should we change the ASC type (from managed private key to + external private key and vice versa). + :type is_private_key_external: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'csr': {'key': 'properties.csr', 'type': 'str'}, + 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + key_size: Optional[int] = None, + csr: Optional[str] = None, + is_private_key_external: Optional[bool] = None, + **kwargs + ): + super(RenewCertificateOrderRequest, self).__init__(kind=kind, **kwargs) + self.key_size = key_size + self.csr = csr + self.is_private_key_external = is_private_key_external + + +class RequestsBasedTrigger(msrest.serialization.Model): + """Trigger based on total requests. + + :param count: Request Count. + :type count: int + :param time_interval: Time interval. + :type time_interval: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__( + self, + *, + count: Optional[int] = None, + time_interval: Optional[str] = None, + **kwargs + ): + super(RequestsBasedTrigger, self).__init__(**kwargs) + self.count = count + self.time_interval = time_interval + + +class ResourceCollection(msrest.serialization.Model): + """Collection of resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[str] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[str]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List[str], + **kwargs + ): + super(ResourceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ResourceHealthMetadata(ProxyOnlyResource): + """Used for getting ResourceHealthCheck settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param category: The category that the resource matches in the RHC Policy File. + :type category: str + :param signal_availability: Is there a health signal for the resource. + :type signal_availability: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'signal_availability': {'key': 'properties.signalAvailability', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + category: Optional[str] = None, + signal_availability: Optional[bool] = None, + **kwargs + ): + super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) + self.category = category + self.signal_availability = signal_availability + + +class ResourceHealthMetadataCollection(msrest.serialization.Model): + """Collection of resource health metadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceHealthMetadata]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["ResourceHealthMetadata"], + **kwargs + ): + super(ResourceHealthMetadataCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ResourceMetricAvailability(msrest.serialization.Model): + """Metrics availability and retention. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar time_grain: Time grain . + :vartype time_grain: str + :ivar retention: Retention period for the current time grain. + :vartype retention: str + """ + + _validation = { + 'time_grain': {'readonly': True}, + 'retention': {'readonly': True}, + } + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceMetricAvailability, self).__init__(**kwargs) + self.time_grain = None + self.retention = None + + +class ResourceMetricDefinition(ProxyOnlyResource): + """Metadata for the metrics. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar unit: Unit of the metric. + :vartype unit: str + :ivar primary_aggregation_type: Primary aggregation type. + :vartype primary_aggregation_type: str + :ivar metric_availabilities: List of time grains supported for the metric together with + retention period. + :vartype metric_availabilities: + list[~azure.mgmt.web.v2020_12_01.models.ResourceMetricAvailability] + :ivar resource_uri: Resource URI. + :vartype resource_uri: str + :ivar properties: Resource metric definition properties. + :vartype properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'metric_availabilities': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, + 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[ResourceMetricAvailability]'}, + 'resource_uri': {'key': 'properties.resourceUri', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': '{str}'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) + self.unit = None + self.primary_aggregation_type = None + self.metric_availabilities = None + self.resource_uri = None + self.properties = None + + +class ResourceMetricDefinitionCollection(msrest.serialization.Model): + """Collection of metric definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinition] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceMetricDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["ResourceMetricDefinition"], + **kwargs + ): + super(ResourceMetricDefinitionCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ResourceNameAvailability(msrest.serialization.Model): + """Information regarding availability of a resource name. + + :param name_available: :code:`true` indicates name is valid and available. + :code:`false` indicates the name is invalid, unavailable, or both. + :type name_available: bool + :param reason: :code:`Invalid` indicates the name provided does not match Azure + App Service naming requirements. :code:`AlreadyExists` indicates that the name is + already in use and is therefore unavailable. Possible values include: "Invalid", + "AlreadyExists". + :type reason: str or ~azure.mgmt.web.v2020_12_01.models.InAvailabilityReasonType + :param message: If reason == invalid, provide the user with the reason why the given name is + invalid, and provide the resource naming requirements so that the user can select a valid name. + If reason == AlreadyExists, explain that resource name is already in use, and direct them to + select a different name. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[Union[str, "InAvailabilityReasonType"]] = None, + message: Optional[str] = None, + **kwargs + ): + super(ResourceNameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class ResourceNameAvailabilityRequest(msrest.serialization.Model): + """Resource name availability request content. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Resource name to verify. + :type name: str + :param type: Required. Resource type used for verification. Possible values include: "Site", + "Slot", "HostingEnvironment", "PublishingUser", "Microsoft.Web/sites", + "Microsoft.Web/sites/slots", "Microsoft.Web/hostingEnvironments", + "Microsoft.Web/publishingUsers". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes + :param is_fqdn: Is fully qualified domain name. + :type is_fqdn: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_fqdn': {'key': 'isFqdn', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: str, + type: Union[str, "CheckNameResourceTypes"], + is_fqdn: Optional[bool] = None, + **kwargs + ): + super(ResourceNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.is_fqdn = is_fqdn + + +class ResponseMetaData(msrest.serialization.Model): + """ResponseMetaData. + + :param data_source: Source of the Data. + :type data_source: ~azure.mgmt.web.v2020_12_01.models.DataSource + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, + } + + def __init__( + self, + *, + data_source: Optional["DataSource"] = None, + **kwargs + ): + super(ResponseMetaData, self).__init__(**kwargs) + self.data_source = data_source + + +class RestoreRequest(ProxyOnlyResource): + """Description of a restore request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param storage_account_url: SAS URL to the container. + :type storage_account_url: str + :param blob_name: Name of a blob which contains the backup. + :type blob_name: str + :param overwrite: :code:`true` if the restore operation can overwrite target app; + otherwise, :code:`false`. :code:`true` is needed if trying to restore + over an existing app. + :type overwrite: bool + :param site_name: Name of an app. + :type site_name: str + :param databases: Collection of databases which should be restored. This list has to match the + list of databases included in the backup. + :type databases: list[~azure.mgmt.web.v2020_12_01.models.DatabaseBackupSetting] + :param ignore_conflicting_host_names: Changes a logic when restoring an app with custom + domains. :code:`true` to remove custom domains automatically. If + :code:`false`, custom domains are added to + the app's object when it is being restored, but that might fail due to conflicts during the + operation. + :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site content. + :type ignore_databases: bool + :param app_service_plan: Specify app service plan that will own restored site. + :type app_service_plan: str + :param operation_type: Operation type. Possible values include: "Default", "Clone", + "Relocation", "Snapshot", "CloudFS". Default value: "Default". + :type operation_type: str or ~azure.mgmt.web.v2020_12_01.models.BackupRestoreOperationType + :param adjust_connection_strings: :code:`true` if SiteConfig.ConnectionStrings + should be set in new app; otherwise, :code:`false`. + :type adjust_connection_strings: bool + :param hosting_environment: App Service Environment name, if needed (only when restoring an app + to an App Service Environment). + :type hosting_environment: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, + 'blob_name': {'key': 'properties.blobName', 'type': 'str'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'site_name': {'key': 'properties.siteName', 'type': 'str'}, + 'databases': {'key': 'properties.databases', 'type': '[DatabaseBackupSetting]'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + 'ignore_databases': {'key': 'properties.ignoreDatabases', 'type': 'bool'}, + 'app_service_plan': {'key': 'properties.appServicePlan', 'type': 'str'}, + 'operation_type': {'key': 'properties.operationType', 'type': 'str'}, + 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, + 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + storage_account_url: Optional[str] = None, + blob_name: Optional[str] = None, + overwrite: Optional[bool] = None, + site_name: Optional[str] = None, + databases: Optional[List["DatabaseBackupSetting"]] = None, + ignore_conflicting_host_names: Optional[bool] = False, + ignore_databases: Optional[bool] = False, + app_service_plan: Optional[str] = None, + operation_type: Optional[Union[str, "BackupRestoreOperationType"]] = "Default", + adjust_connection_strings: Optional[bool] = None, + hosting_environment: Optional[str] = None, + **kwargs + ): + super(RestoreRequest, self).__init__(kind=kind, **kwargs) + self.storage_account_url = storage_account_url + self.blob_name = blob_name + self.overwrite = overwrite + self.site_name = site_name + self.databases = databases + self.ignore_conflicting_host_names = ignore_conflicting_host_names + self.ignore_databases = ignore_databases + self.app_service_plan = app_service_plan + self.operation_type = operation_type + self.adjust_connection_strings = adjust_connection_strings + self.hosting_environment = hosting_environment + + +class SampleUtterance(msrest.serialization.Model): + """Sample utterance. + + :param text: Text attribute of sample utterance. + :type text: str + :param links: Links attribute of sample utterance. + :type links: list[str] + :param qid: Question id of sample utterance (for stackoverflow questions titles). + :type qid: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'links': {'key': 'links', 'type': '[str]'}, + 'qid': {'key': 'qid', 'type': 'str'}, + } + + def __init__( + self, + *, + text: Optional[str] = None, + links: Optional[List[str]] = None, + qid: Optional[str] = None, + **kwargs + ): + super(SampleUtterance, self).__init__(**kwargs) + self.text = text + self.links = links + self.qid = qid + + +class ServiceSpecification(msrest.serialization.Model): + """Resource metrics service provided by Microsoft.Insights resource provider. + + :param metric_specifications: + :type metric_specifications: list[~azure.mgmt.web.v2020_12_01.models.MetricSpecification] + :param log_specifications: + :type log_specifications: list[~azure.mgmt.web.v2020_12_01.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__( + self, + *, + metric_specifications: Optional[List["MetricSpecification"]] = None, + log_specifications: Optional[List["LogSpecification"]] = None, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + self.log_specifications = log_specifications + + +class Site(Resource): + """A web app, a mobile app backend, or an API app. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: Managed service identity. + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :ivar state: Current state of the app. + :vartype state: str + :ivar host_names: Hostnames associated with the app. + :vartype host_names: list[str] + :ivar repository_site_name: Name of the repository site. + :vartype repository_site_name: str + :ivar usage_state: State indicating whether the app has exceeded its quota usage. Read-only. + Possible values include: "Normal", "Exceeded". + :vartype usage_state: str or ~azure.mgmt.web.v2020_12_01.models.UsageState + :param enabled: :code:`true` if the app is enabled; otherwise, + :code:`false`. Setting this value to false disables the app (takes the app + offline). + :type enabled: bool + :ivar enabled_host_names: Enabled hostnames for the app.Hostnames need to be assigned (see + HostNames) AND enabled. Otherwise, + the app is not served on those hostnames. + :vartype enabled_host_names: list[str] + :ivar availability_state: Management information availability state for the app. Possible + values include: "Normal", "Limited", "DisasterRecoveryMode". + :vartype availability_state: str or ~azure.mgmt.web.v2020_12_01.models.SiteAvailabilityState + :param host_name_ssl_states: Hostname SSL states are used to manage the SSL bindings for app's + hostnames. + :type host_name_ssl_states: list[~azure.mgmt.web.v2020_12_01.models.HostNameSslState] + :param server_farm_id: Resource ID of the associated App Service plan, formatted as: + "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + :type server_farm_id: str + :param reserved: :code:`true` if reserved; otherwise, :code:`false`. + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. + :type hyper_v: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. + :vartype last_modified_time_utc: ~datetime.datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfig + :ivar traffic_manager_host_names: Azure Traffic Manager hostnames associated with the app. + Read-only. + :vartype traffic_manager_host_names: list[str] + :param scm_site_also_stopped: :code:`true` to stop SCM (KUDU) site when the app is + stopped; otherwise, :code:`false`. The default is :code:`false`. + :type scm_site_also_stopped: bool + :ivar target_swap_slot: Specifies which deployment slot this app will swap into. Read-only. + :vartype target_swap_slot: str + :param hosting_environment_profile: App Service Environment to use for the app. + :type hosting_environment_profile: ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: :code:`true` to enable client affinity; + :code:`false` to stop sending session affinity cookies, which route client + requests in the same session to the same instance. Default is :code:`true`. + :type client_affinity_enabled: bool + :param client_cert_enabled: :code:`true` to enable client certificate + authentication (TLS mutual authentication); otherwise, :code:`false`. Default is + :code:`false`. + :type client_cert_enabled: bool + :param client_cert_mode: This composes with ClientCertEnabled setting. + + + * ClientCertEnabled: false means ClientCert is ignored. + * ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or + accepted. Possible values include: "Required", "Optional", "OptionalInteractiveUser". + :type client_cert_mode: str or ~azure.mgmt.web.v2020_12_01.models.ClientCertMode + :param client_cert_exclusion_paths: client certificate authentication comma-separated exclusion + paths. + :type client_cert_exclusion_paths: str + :param host_names_disabled: :code:`true` to disable the public hostnames of the + app; otherwise, :code:`false`. + If :code:`true`, the app is only accessible via API management process. + :type host_names_disabled: bool + :param custom_domain_verification_id: Unique identifier that verifies the custom domains + assigned to the app. Customer will add this id to a txt record for verification. + :type custom_domain_verification_id: str + :ivar outbound_ip_addresses: List of IP addresses that the app uses for outbound connections + (e.g. database access). Includes VIPs from tenants that site can be hosted with current + settings. Read-only. + :vartype outbound_ip_addresses: str + :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. + :vartype possible_outbound_ip_addresses: str + :param container_size: Size of the function container. + :type container_size: int + :param daily_memory_time_quota: Maximum allowed daily memory-time quota (applicable on dynamic + apps only). + :type daily_memory_time_quota: int + :ivar suspended_till: App suspended till in case memory-time quota is exceeded. + :vartype suspended_till: ~datetime.datetime + :ivar max_number_of_workers: Maximum number of workers. + This only applies to Functions container. + :vartype max_number_of_workers: int + :param cloning_info: If specified during app creation, the app is cloned from a source app. + :type cloning_info: ~azure.mgmt.web.v2020_12_01.models.CloningInfo + :ivar resource_group: Name of the resource group the app belongs to. Read-only. + :vartype resource_group: str + :ivar is_default_container: :code:`true` if the app is a default container; + otherwise, :code:`false`. + :vartype is_default_container: bool + :ivar default_host_name: Default hostname of the app. Read-only. + :vartype default_host_name: str + :ivar slot_swap_status: Status of the last deployment slot swap operation. + :vartype slot_swap_status: ~azure.mgmt.web.v2020_12_01.models.SlotSwapStatus + :param key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :type key_vault_reference_identity: str + :param https_only: HttpsOnly: configures a web site to accept only https requests. Issues + redirect for + http requests. + :type https_only: bool + :param redundancy_mode: Site redundancy mode. Possible values include: "None", "Manual", + "Failover", "ActiveActive", "GeoRedundant". + :type redundancy_mode: str or ~azure.mgmt.web.v2020_12_01.models.RedundancyMode + :ivar in_progress_operation_id: Specifies an operation id if this site has a pending operation. + :vartype in_progress_operation_id: str + :param storage_account_required: Checks if Customer provided storage account is required. + :type storage_account_required: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'host_names': {'readonly': True}, + 'repository_site_name': {'readonly': True}, + 'usage_state': {'readonly': True}, + 'enabled_host_names': {'readonly': True}, + 'availability_state': {'readonly': True}, + 'last_modified_time_utc': {'readonly': True}, + 'traffic_manager_host_names': {'readonly': True}, + 'target_swap_slot': {'readonly': True}, + 'outbound_ip_addresses': {'readonly': True}, + 'possible_outbound_ip_addresses': {'readonly': True}, + 'suspended_till': {'readonly': True}, + 'max_number_of_workers': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'is_default_container': {'readonly': True}, + 'default_host_name': {'readonly': True}, + 'slot_swap_status': {'readonly': True}, + 'in_progress_operation_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + 'repository_site_name': {'key': 'properties.repositorySiteName', 'type': 'str'}, + 'usage_state': {'key': 'properties.usageState', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'str'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, + 'last_modified_time_utc': {'key': 'properties.lastModifiedTimeUtc', 'type': 'iso-8601'}, + 'site_config': {'key': 'properties.siteConfig', 'type': 'SiteConfig'}, + 'traffic_manager_host_names': {'key': 'properties.trafficManagerHostNames', 'type': '[str]'}, + 'scm_site_also_stopped': {'key': 'properties.scmSiteAlsoStopped', 'type': 'bool'}, + 'target_swap_slot': {'key': 'properties.targetSwapSlot', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'client_affinity_enabled': {'key': 'properties.clientAffinityEnabled', 'type': 'bool'}, + 'client_cert_enabled': {'key': 'properties.clientCertEnabled', 'type': 'bool'}, + 'client_cert_mode': {'key': 'properties.clientCertMode', 'type': 'str'}, + 'client_cert_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + 'custom_domain_verification_id': {'key': 'properties.customDomainVerificationId', 'type': 'str'}, + 'outbound_ip_addresses': {'key': 'properties.outboundIpAddresses', 'type': 'str'}, + 'possible_outbound_ip_addresses': {'key': 'properties.possibleOutboundIpAddresses', 'type': 'str'}, + 'container_size': {'key': 'properties.containerSize', 'type': 'int'}, + 'daily_memory_time_quota': {'key': 'properties.dailyMemoryTimeQuota', 'type': 'int'}, + 'suspended_till': {'key': 'properties.suspendedTill', 'type': 'iso-8601'}, + 'max_number_of_workers': {'key': 'properties.maxNumberOfWorkers', 'type': 'int'}, + 'cloning_info': {'key': 'properties.cloningInfo', 'type': 'CloningInfo'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'is_default_container': {'key': 'properties.isDefaultContainer', 'type': 'bool'}, + 'default_host_name': {'key': 'properties.defaultHostName', 'type': 'str'}, + 'slot_swap_status': {'key': 'properties.slotSwapStatus', 'type': 'SlotSwapStatus'}, + 'key_vault_reference_identity': {'key': 'properties.keyVaultReferenceIdentity', 'type': 'str'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'str'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, + } + + def __init__( + self, + *, + location: str, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + enabled: Optional[bool] = None, + host_name_ssl_states: Optional[List["HostNameSslState"]] = None, + server_farm_id: Optional[str] = None, + reserved: Optional[bool] = False, + is_xenon: Optional[bool] = False, + hyper_v: Optional[bool] = False, + site_config: Optional["SiteConfig"] = None, + scm_site_also_stopped: Optional[bool] = False, + hosting_environment_profile: Optional["HostingEnvironmentProfile"] = None, + client_affinity_enabled: Optional[bool] = None, + client_cert_enabled: Optional[bool] = None, + client_cert_mode: Optional[Union[str, "ClientCertMode"]] = None, + client_cert_exclusion_paths: Optional[str] = None, + host_names_disabled: Optional[bool] = None, + custom_domain_verification_id: Optional[str] = None, + container_size: Optional[int] = None, + daily_memory_time_quota: Optional[int] = None, + cloning_info: Optional["CloningInfo"] = None, + key_vault_reference_identity: Optional[str] = None, + https_only: Optional[bool] = None, + redundancy_mode: Optional[Union[str, "RedundancyMode"]] = None, + storage_account_required: Optional[bool] = None, + **kwargs + ): + super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.identity = identity + self.state = None + self.host_names = None + self.repository_site_name = None + self.usage_state = None + self.enabled = enabled + self.enabled_host_names = None + self.availability_state = None + self.host_name_ssl_states = host_name_ssl_states + self.server_farm_id = server_farm_id + self.reserved = reserved + self.is_xenon = is_xenon + self.hyper_v = hyper_v + self.last_modified_time_utc = None + self.site_config = site_config + self.traffic_manager_host_names = None + self.scm_site_also_stopped = scm_site_also_stopped + self.target_swap_slot = None + self.hosting_environment_profile = hosting_environment_profile + self.client_affinity_enabled = client_affinity_enabled + self.client_cert_enabled = client_cert_enabled + self.client_cert_mode = client_cert_mode + self.client_cert_exclusion_paths = client_cert_exclusion_paths + self.host_names_disabled = host_names_disabled + self.custom_domain_verification_id = custom_domain_verification_id + self.outbound_ip_addresses = None + self.possible_outbound_ip_addresses = None + self.container_size = container_size + self.daily_memory_time_quota = daily_memory_time_quota + self.suspended_till = None + self.max_number_of_workers = None + self.cloning_info = cloning_info + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.key_vault_reference_identity = key_vault_reference_identity + self.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.storage_account_required = storage_account_required + + +class SiteAuthSettings(ProxyOnlyResource): + """Configuration settings for the Azure App Service Authentication / Authorization feature. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: :code:`true` if the Authentication / Authorization feature is + enabled for the current app; otherwise, :code:`false`. + :type enabled: bool + :param runtime_version: The RuntimeVersion of the Authentication / Authorization feature in use + for the current app. + The setting in this value can control the behavior of certain features in the Authentication / + Authorization module. + :type runtime_version: str + :param config_version: The ConfigVersion of the Authentication / Authorization feature in use + for the current app. + The setting in this value can control the behavior of the control plane for Authentication / + Authorization. + :type config_version: str + :param unauthenticated_client_action: The action to take when an unauthenticated client + attempts to access the app. Possible values include: "RedirectToLoginPage", "AllowAnonymous". + :type unauthenticated_client_action: str or + ~azure.mgmt.web.v2020_12_01.models.UnauthenticatedClientAction + :param token_store_enabled: :code:`true` to durably store platform-specific + security tokens that are obtained during login flows; otherwise, :code:`false`. + The default is :code:`false`. + :type token_store_enabled: bool + :param allowed_external_redirect_urls: External URLs that can be redirected to as part of + logging in or logging out of the app. Note that the query string part of the URL is ignored. + This is an advanced setting typically only needed by Windows Store application backends. + Note that URLs within the current domain are always implicitly allowed. + :type allowed_external_redirect_urls: list[str] + :param default_provider: The default authentication provider to use when multiple providers are + configured. + This setting is only needed if multiple providers are configured and the unauthenticated + client + action is set to "RedirectToLoginPage". Possible values include: "AzureActiveDirectory", + "Facebook", "Google", "MicrosoftAccount", "Twitter", "Github". + :type default_provider: str or ~azure.mgmt.web.v2020_12_01.models.BuiltInAuthenticationProvider + :param token_refresh_extension_hours: The number of hours after session token expiration that a + session token can be used to + call the token refresh API. The default is 72 hours. + :type token_refresh_extension_hours: float + :param client_id: The Client ID of this relying party application, known as the client_id. + This setting is required for enabling OpenID Connection authentication with Azure Active + Directory or + other 3rd party OpenID Connect providers. + More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + :type client_id: str + :param client_secret: The Client Secret of this relying party application (in Azure Active + Directory, this is also referred to as the Key). + This setting is optional. If no client secret is configured, the OpenID Connect implicit auth + flow is used to authenticate end users. + Otherwise, the OpenID Connect Authorization Code Flow is used to authenticate end users. + More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + :type client_secret: str + :param client_secret_setting_name: The app setting name that contains the client secret of the + relying party application. + :type client_secret_setting_name: str + :param client_secret_certificate_thumbprint: An alternative to the client secret, that is the + thumbprint of a certificate used for signing purposes. This property acts as + a replacement for the Client Secret. It is also optional. + :type client_secret_certificate_thumbprint: str + :param issuer: The OpenID Connect Issuer URI that represents the entity which issues access + tokens for this application. + When using Azure Active Directory, this value is the URI of the directory tenant, e.g. + https://sts.windows.net/{tenant-guid}/. + This URI is a case-sensitive identifier for the token issuer. + More information on OpenID Connect Discovery: + http://openid.net/specs/openid-connect-discovery-1_0.html. + :type issuer: str + :param validate_issuer: Gets a value indicating whether the issuer should be a valid HTTPS url + and be validated as such. + :type validate_issuer: bool + :param allowed_audiences: Allowed audience values to consider when validating JWTs issued by + Azure Active Directory. Note that the :code:`ClientID` value is always considered + an + allowed audience, regardless of this setting. + :type allowed_audiences: list[str] + :param additional_login_params: Login parameters to send to the OpenID Connect authorization + endpoint when + a user logs in. Each parameter must be in the form "key=value". + :type additional_login_params: list[str] + :param aad_claims_authorization: Gets a JSON string containing the Azure AD Acl settings. + :type aad_claims_authorization: str + :param google_client_id: The OpenID Connect Client ID for the Google web application. + This setting is required for enabling Google Sign-In. + Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + :type google_client_id: str + :param google_client_secret: The client secret associated with the Google web application. + This setting is required for enabling Google Sign-In. + Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + :type google_client_secret: str + :param google_client_secret_setting_name: The app setting name that contains the client secret + associated with + the Google web application. + :type google_client_secret_setting_name: str + :param google_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Google + Sign-In authentication. + This setting is optional. If not specified, "openid", "profile", and "email" are used as + default scopes. + Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + :type google_o_auth_scopes: list[str] + :param facebook_app_id: The App ID of the Facebook app used for login. + This setting is required for enabling Facebook Login. + Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + :type facebook_app_id: str + :param facebook_app_secret: The App Secret of the Facebook app used for Facebook Login. + This setting is required for enabling Facebook Login. + Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + :type facebook_app_secret: str + :param facebook_app_secret_setting_name: The app setting name that contains the app secret used + for Facebook Login. + :type facebook_app_secret_setting_name: str + :param facebook_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of Facebook + Login authentication. + This setting is optional. + Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + :type facebook_o_auth_scopes: list[str] + :param git_hub_client_id: The Client Id of the GitHub app used for login. + This setting is required for enabling Github login. + :type git_hub_client_id: str + :param git_hub_client_secret: The Client Secret of the GitHub app used for Github Login. + This setting is required for enabling Github login. + :type git_hub_client_secret: str + :param git_hub_client_secret_setting_name: The app setting name that contains the client secret + of the Github + app used for GitHub Login. + :type git_hub_client_secret_setting_name: str + :param git_hub_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of GitHub + Login authentication. + This setting is optional. + :type git_hub_o_auth_scopes: list[str] + :param twitter_consumer_key: The OAuth 1.0a consumer key of the Twitter application used for + sign-in. + This setting is required for enabling Twitter Sign-In. + Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in. + :type twitter_consumer_key: str + :param twitter_consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used + for sign-in. + This setting is required for enabling Twitter Sign-In. + Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in. + :type twitter_consumer_secret: str + :param twitter_consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a + consumer secret of the Twitter + application used for sign-in. + :type twitter_consumer_secret_setting_name: str + :param microsoft_account_client_id: The OAuth 2.0 client ID that was created for the app used + for authentication. + This setting is required for enabling Microsoft Account authentication. + Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + :type microsoft_account_client_id: str + :param microsoft_account_client_secret: The OAuth 2.0 client secret that was created for the + app used for authentication. + This setting is required for enabling Microsoft Account authentication. + Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + :type microsoft_account_client_secret: str + :param microsoft_account_client_secret_setting_name: The app setting name containing the OAuth + 2.0 client secret that was created for the + app used for authentication. + :type microsoft_account_client_secret_setting_name: str + :param microsoft_account_o_auth_scopes: The OAuth 2.0 scopes that will be requested as part of + Microsoft Account authentication. + This setting is optional. If not specified, "wl.basic" is used as the default scope. + Microsoft Account Scopes and permissions documentation: + https://msdn.microsoft.com/en-us/library/dn631845.aspx. + :type microsoft_account_o_auth_scopes: list[str] + :param is_auth_from_file: "true" if the auth config settings should be read from a file, + "false" otherwise. + :type is_auth_from_file: str + :param auth_file_path: The path of the config file containing auth settings. + If the path is relative, base will the site's root directory. + :type auth_file_path: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, + 'config_version': {'key': 'properties.configVersion', 'type': 'str'}, + 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'str'}, + 'token_store_enabled': {'key': 'properties.tokenStoreEnabled', 'type': 'bool'}, + 'allowed_external_redirect_urls': {'key': 'properties.allowedExternalRedirectUrls', 'type': '[str]'}, + 'default_provider': {'key': 'properties.defaultProvider', 'type': 'str'}, + 'token_refresh_extension_hours': {'key': 'properties.tokenRefreshExtensionHours', 'type': 'float'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'client_secret_setting_name': {'key': 'properties.clientSecretSettingName', 'type': 'str'}, + 'client_secret_certificate_thumbprint': {'key': 'properties.clientSecretCertificateThumbprint', 'type': 'str'}, + 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'validate_issuer': {'key': 'properties.validateIssuer', 'type': 'bool'}, + 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, + 'additional_login_params': {'key': 'properties.additionalLoginParams', 'type': '[str]'}, + 'aad_claims_authorization': {'key': 'properties.aadClaimsAuthorization', 'type': 'str'}, + 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, + 'google_client_secret': {'key': 'properties.googleClientSecret', 'type': 'str'}, + 'google_client_secret_setting_name': {'key': 'properties.googleClientSecretSettingName', 'type': 'str'}, + 'google_o_auth_scopes': {'key': 'properties.googleOAuthScopes', 'type': '[str]'}, + 'facebook_app_id': {'key': 'properties.facebookAppId', 'type': 'str'}, + 'facebook_app_secret': {'key': 'properties.facebookAppSecret', 'type': 'str'}, + 'facebook_app_secret_setting_name': {'key': 'properties.facebookAppSecretSettingName', 'type': 'str'}, + 'facebook_o_auth_scopes': {'key': 'properties.facebookOAuthScopes', 'type': '[str]'}, + 'git_hub_client_id': {'key': 'properties.gitHubClientId', 'type': 'str'}, + 'git_hub_client_secret': {'key': 'properties.gitHubClientSecret', 'type': 'str'}, + 'git_hub_client_secret_setting_name': {'key': 'properties.gitHubClientSecretSettingName', 'type': 'str'}, + 'git_hub_o_auth_scopes': {'key': 'properties.gitHubOAuthScopes', 'type': '[str]'}, + 'twitter_consumer_key': {'key': 'properties.twitterConsumerKey', 'type': 'str'}, + 'twitter_consumer_secret': {'key': 'properties.twitterConsumerSecret', 'type': 'str'}, + 'twitter_consumer_secret_setting_name': {'key': 'properties.twitterConsumerSecretSettingName', 'type': 'str'}, + 'microsoft_account_client_id': {'key': 'properties.microsoftAccountClientId', 'type': 'str'}, + 'microsoft_account_client_secret': {'key': 'properties.microsoftAccountClientSecret', 'type': 'str'}, + 'microsoft_account_client_secret_setting_name': {'key': 'properties.microsoftAccountClientSecretSettingName', 'type': 'str'}, + 'microsoft_account_o_auth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', 'type': '[str]'}, + 'is_auth_from_file': {'key': 'properties.isAuthFromFile', 'type': 'str'}, + 'auth_file_path': {'key': 'properties.authFilePath', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + runtime_version: Optional[str] = None, + config_version: Optional[str] = None, + unauthenticated_client_action: Optional[Union[str, "UnauthenticatedClientAction"]] = None, + token_store_enabled: Optional[bool] = None, + allowed_external_redirect_urls: Optional[List[str]] = None, + default_provider: Optional[Union[str, "BuiltInAuthenticationProvider"]] = None, + token_refresh_extension_hours: Optional[float] = None, + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + issuer: Optional[str] = None, + validate_issuer: Optional[bool] = None, + allowed_audiences: Optional[List[str]] = None, + additional_login_params: Optional[List[str]] = None, + aad_claims_authorization: Optional[str] = None, + google_client_id: Optional[str] = None, + google_client_secret: Optional[str] = None, + google_client_secret_setting_name: Optional[str] = None, + google_o_auth_scopes: Optional[List[str]] = None, + facebook_app_id: Optional[str] = None, + facebook_app_secret: Optional[str] = None, + facebook_app_secret_setting_name: Optional[str] = None, + facebook_o_auth_scopes: Optional[List[str]] = None, + git_hub_client_id: Optional[str] = None, + git_hub_client_secret: Optional[str] = None, + git_hub_client_secret_setting_name: Optional[str] = None, + git_hub_o_auth_scopes: Optional[List[str]] = None, + twitter_consumer_key: Optional[str] = None, + twitter_consumer_secret: Optional[str] = None, + twitter_consumer_secret_setting_name: Optional[str] = None, + microsoft_account_client_id: Optional[str] = None, + microsoft_account_client_secret: Optional[str] = None, + microsoft_account_client_secret_setting_name: Optional[str] = None, + microsoft_account_o_auth_scopes: Optional[List[str]] = None, + is_auth_from_file: Optional[str] = None, + auth_file_path: Optional[str] = None, + **kwargs + ): + super(SiteAuthSettings, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.runtime_version = runtime_version + self.config_version = config_version + self.unauthenticated_client_action = unauthenticated_client_action + self.token_store_enabled = token_store_enabled + self.allowed_external_redirect_urls = allowed_external_redirect_urls + self.default_provider = default_provider + self.token_refresh_extension_hours = token_refresh_extension_hours + self.client_id = client_id + self.client_secret = client_secret + self.client_secret_setting_name = client_secret_setting_name + self.client_secret_certificate_thumbprint = client_secret_certificate_thumbprint + self.issuer = issuer + self.validate_issuer = validate_issuer + self.allowed_audiences = allowed_audiences + self.additional_login_params = additional_login_params + self.aad_claims_authorization = aad_claims_authorization + self.google_client_id = google_client_id + self.google_client_secret = google_client_secret + self.google_client_secret_setting_name = google_client_secret_setting_name + self.google_o_auth_scopes = google_o_auth_scopes + self.facebook_app_id = facebook_app_id + self.facebook_app_secret = facebook_app_secret + self.facebook_app_secret_setting_name = facebook_app_secret_setting_name + self.facebook_o_auth_scopes = facebook_o_auth_scopes + self.git_hub_client_id = git_hub_client_id + self.git_hub_client_secret = git_hub_client_secret + self.git_hub_client_secret_setting_name = git_hub_client_secret_setting_name + self.git_hub_o_auth_scopes = git_hub_o_auth_scopes + self.twitter_consumer_key = twitter_consumer_key + self.twitter_consumer_secret = twitter_consumer_secret + self.twitter_consumer_secret_setting_name = twitter_consumer_secret_setting_name + self.microsoft_account_client_id = microsoft_account_client_id + self.microsoft_account_client_secret = microsoft_account_client_secret + self.microsoft_account_client_secret_setting_name = microsoft_account_client_secret_setting_name + self.microsoft_account_o_auth_scopes = microsoft_account_o_auth_scopes + self.is_auth_from_file = is_auth_from_file + self.auth_file_path = auth_file_path + + +class SiteAuthSettingsV2(ProxyOnlyResource): + """SiteAuthSettingsV2. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param platform: + :type platform: ~azure.mgmt.web.v2020_12_01.models.AuthPlatform + :param global_validation: + :type global_validation: ~azure.mgmt.web.v2020_12_01.models.GlobalValidation + :param identity_providers: + :type identity_providers: ~azure.mgmt.web.v2020_12_01.models.IdentityProviders + :param login: + :type login: ~azure.mgmt.web.v2020_12_01.models.Login + :param http_settings: + :type http_settings: ~azure.mgmt.web.v2020_12_01.models.HttpSettings + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'platform': {'key': 'properties.platform', 'type': 'AuthPlatform'}, + 'global_validation': {'key': 'properties.globalValidation', 'type': 'GlobalValidation'}, + 'identity_providers': {'key': 'properties.identityProviders', 'type': 'IdentityProviders'}, + 'login': {'key': 'properties.login', 'type': 'Login'}, + 'http_settings': {'key': 'properties.httpSettings', 'type': 'HttpSettings'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + platform: Optional["AuthPlatform"] = None, + global_validation: Optional["GlobalValidation"] = None, + identity_providers: Optional["IdentityProviders"] = None, + login: Optional["Login"] = None, + http_settings: Optional["HttpSettings"] = None, + **kwargs + ): + super(SiteAuthSettingsV2, self).__init__(kind=kind, **kwargs) + self.platform = platform + self.global_validation = global_validation + self.identity_providers = identity_providers + self.login = login + self.http_settings = http_settings + + +class SiteCloneability(msrest.serialization.Model): + """Represents whether or not an app is cloneable. + + :param result: Name of app. Possible values include: "Cloneable", "PartiallyCloneable", + "NotCloneable". + :type result: str or ~azure.mgmt.web.v2020_12_01.models.CloneAbilityResult + :param blocking_features: List of features enabled on app that prevent cloning. + :type blocking_features: list[~azure.mgmt.web.v2020_12_01.models.SiteCloneabilityCriterion] + :param unsupported_features: List of features enabled on app that are non-blocking but cannot + be cloned. The app can still be cloned + but the features in this list will not be set up on cloned app. + :type unsupported_features: list[~azure.mgmt.web.v2020_12_01.models.SiteCloneabilityCriterion] + :param blocking_characteristics: List of blocking application characteristics. + :type blocking_characteristics: + list[~azure.mgmt.web.v2020_12_01.models.SiteCloneabilityCriterion] + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'str'}, + 'blocking_features': {'key': 'blockingFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'unsupported_features': {'key': 'unsupportedFeatures', 'type': '[SiteCloneabilityCriterion]'}, + 'blocking_characteristics': {'key': 'blockingCharacteristics', 'type': '[SiteCloneabilityCriterion]'}, + } + + def __init__( + self, + *, + result: Optional[Union[str, "CloneAbilityResult"]] = None, + blocking_features: Optional[List["SiteCloneabilityCriterion"]] = None, + unsupported_features: Optional[List["SiteCloneabilityCriterion"]] = None, + blocking_characteristics: Optional[List["SiteCloneabilityCriterion"]] = None, + **kwargs + ): + super(SiteCloneability, self).__init__(**kwargs) + self.result = result + self.blocking_features = blocking_features + self.unsupported_features = unsupported_features + self.blocking_characteristics = blocking_characteristics + + +class SiteCloneabilityCriterion(msrest.serialization.Model): + """An app cloneability criterion. + + :param name: Name of criterion. + :type name: str + :param description: Description of criterion. + :type description: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(SiteCloneabilityCriterion, self).__init__(**kwargs) + self.name = name + self.description = description + + +class SiteConfig(msrest.serialization.Model): + """Configuration of an App Service app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param number_of_workers: Number of workers. + :type number_of_workers: int + :param default_documents: Default documents. + :type default_documents: list[str] + :param net_framework_version: .NET Framework version. + :type net_framework_version: str + :param php_version: Version of PHP. + :type php_version: str + :param python_version: Version of Python. + :type python_version: str + :param node_version: Version of Node.js. + :type node_version: str + :param power_shell_version: Version of PowerShell. + :type power_shell_version: str + :param linux_fx_version: Linux App Framework and version. + :type linux_fx_version: str + :param windows_fx_version: Xenon App Framework and version. + :type windows_fx_version: str + :param request_tracing_enabled: :code:`true` if request tracing is enabled; + otherwise, :code:`false`. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: ~datetime.datetime + :param remote_debugging_enabled: :code:`true` if remote debugging is enabled; + otherwise, :code:`false`. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: :code:`true` if HTTP logging is enabled; otherwise, + :code:`false`. + :type http_logging_enabled: bool + :param logs_directory_size_limit: HTTP logs directory size limit. + :type logs_directory_size_limit: int + :param detailed_error_logging_enabled: :code:`true` if detailed error logging is + enabled; otherwise, :code:`false`. + :type detailed_error_logging_enabled: bool + :param publishing_username: Publishing user name. + :type publishing_username: str + :param app_settings: Application settings. + :type app_settings: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + :param azure_storage_accounts: List of Azure Storage Accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2020_12_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: list[~azure.mgmt.web.v2020_12_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_12_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: list[~azure.mgmt.web.v2020_12_01.models.HandlerMapping] + :param document_root: Document root. + :type document_root: str + :param scm_type: SCM type. Possible values include: "None", "Dropbox", "Tfs", "LocalGit", + "GitHub", "CodePlexGit", "CodePlexHg", "BitbucketGit", "BitbucketHg", "ExternalGit", + "ExternalHg", "OneDrive", "VSO", "VSTSRM". + :type scm_type: str or ~azure.mgmt.web.v2020_12_01.models.ScmType + :param use32_bit_worker_process: :code:`true` to use 32-bit worker process; + otherwise, :code:`false`. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: :code:`true` if WebSocket is enabled; otherwise, + :code:`false`. + :type web_sockets_enabled: bool + :param always_on: :code:`true` if Always On is enabled; otherwise, + :code:`false`. + :type always_on: bool + :param java_version: Java version. + :type java_version: str + :param java_container: Java container. + :type java_container: str + :param java_container_version: Java container version. + :type java_container_version: str + :param app_command_line: App command line to launch. + :type app_command_line: str + :param managed_pipeline_mode: Managed pipeline mode. Possible values include: "Integrated", + "Classic". + :type managed_pipeline_mode: str or ~azure.mgmt.web.v2020_12_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: list[~azure.mgmt.web.v2020_12_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: "WeightedRoundRobin", + "LeastRequests", "LeastResponseTime", "WeightedTotalTraffic", "RequestHash", + "PerSiteRoundRobin". + :type load_balancing: str or ~azure.mgmt.web.v2020_12_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_12_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_12_01.models.SiteLimits + :param auto_heal_enabled: :code:`true` if Auto Heal is enabled; otherwise, + :code:`false`. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_12_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param vnet_route_all_enabled: Virtual Network Route All enabled. This causes all outbound + traffic to have Virtual Network Security Groups and User Defined Routes applied. + :type vnet_route_all_enabled: bool + :param vnet_private_ports_count: The number of private ports assigned to this app. These will + be assigned dynamically on runtime. + :type vnet_private_ports_count: int + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2020_12_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :param api_definition: Information about the formal API definition for the app. + :type api_definition: ~azure.mgmt.web.v2020_12_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the app. + :type api_management_config: ~azure.mgmt.web.v2020_12_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: :code:`true` to enable local MySQL; otherwise, + :code:`false`. + :type local_my_sql_enabled: bool + :param managed_service_identity_id: Managed Service Identity Id. + :type managed_service_identity_id: int + :param x_managed_service_identity_id: Explicit Managed Service Identity Id. + :type x_managed_service_identity_id: int + :param key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :type key_vault_reference_identity: str + :param ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: list[~azure.mgmt.web.v2020_12_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_12_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions_use_main: IP security restrictions for scm to use main. + :type scm_ip_security_restrictions_use_main: bool + :param http20_enabled: Http20Enabled: configures a web site to allow clients to connect over + http2.0. + :type http20_enabled: bool + :param min_tls_version: MinTlsVersion: configures the minimum version of TLS required for SSL + requests. Possible values include: "1.0", "1.1", "1.2". + :type min_tls_version: str or ~azure.mgmt.web.v2020_12_01.models.SupportedTlsVersions + :param scm_min_tls_version: ScmMinTlsVersion: configures the minimum version of TLS required + for SSL requests for SCM site. Possible values include: "1.0", "1.1", "1.2". + :type scm_min_tls_version: str or ~azure.mgmt.web.v2020_12_01.models.SupportedTlsVersions + :param ftps_state: State of FTP / FTPS service. Possible values include: "AllAllowed", + "FtpsOnly", "Disabled". + :type ftps_state: str or ~azure.mgmt.web.v2020_12_01.models.FtpsState + :param pre_warmed_instance_count: Number of preWarmed instances. + This setting only applies to the Consumption and Elastic Plans. + :type pre_warmed_instance_count: int + :param function_app_scale_limit: Maximum number of workers that a site can scale out to. + This setting only applies to the Consumption and Elastic Premium Plans. + :type function_app_scale_limit: int + :param health_check_path: Health check path. + :type health_check_path: str + :param functions_runtime_scale_monitoring_enabled: Gets or sets a value indicating whether + functions runtime scale monitoring is enabled. When enabled, + the ScaleController will not monitor event sources directly, but will instead call to the + runtime to get scale status. + :type functions_runtime_scale_monitoring_enabled: bool + :param website_time_zone: Sets the time zone a site uses for generating timestamps. Compatible + with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence + over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a + quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, + expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows + NT\CurrentVersion\Time Zones. + :type website_time_zone: str + :param minimum_elastic_instance_count: Number of minimum instance count for a site + This setting only applies to the Elastic Plans. + :type minimum_elastic_instance_count: int + """ + + _validation = { + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, 'minimum': 0}, + 'function_app_scale_limit': {'minimum': 0}, + 'minimum_elastic_instance_count': {'maximum': 20, 'minimum': 0}, + } + + _attribute_map = { + 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, + 'default_documents': {'key': 'defaultDocuments', 'type': '[str]'}, + 'net_framework_version': {'key': 'netFrameworkVersion', 'type': 'str'}, + 'php_version': {'key': 'phpVersion', 'type': 'str'}, + 'python_version': {'key': 'pythonVersion', 'type': 'str'}, + 'node_version': {'key': 'nodeVersion', 'type': 'str'}, + 'power_shell_version': {'key': 'powerShellVersion', 'type': 'str'}, + 'linux_fx_version': {'key': 'linuxFxVersion', 'type': 'str'}, + 'windows_fx_version': {'key': 'windowsFxVersion', 'type': 'str'}, + 'request_tracing_enabled': {'key': 'requestTracingEnabled', 'type': 'bool'}, + 'request_tracing_expiration_time': {'key': 'requestTracingExpirationTime', 'type': 'iso-8601'}, + 'remote_debugging_enabled': {'key': 'remoteDebuggingEnabled', 'type': 'bool'}, + 'remote_debugging_version': {'key': 'remoteDebuggingVersion', 'type': 'str'}, + 'http_logging_enabled': {'key': 'httpLoggingEnabled', 'type': 'bool'}, + 'logs_directory_size_limit': {'key': 'logsDirectorySizeLimit', 'type': 'int'}, + 'detailed_error_logging_enabled': {'key': 'detailedErrorLoggingEnabled', 'type': 'bool'}, + 'publishing_username': {'key': 'publishingUsername', 'type': 'str'}, + 'app_settings': {'key': 'appSettings', 'type': '[NameValuePair]'}, + 'azure_storage_accounts': {'key': 'azureStorageAccounts', 'type': '{AzureStorageInfoValue}'}, + 'connection_strings': {'key': 'connectionStrings', 'type': '[ConnStringInfo]'}, + 'machine_key': {'key': 'machineKey', 'type': 'SiteMachineKey'}, + 'handler_mappings': {'key': 'handlerMappings', 'type': '[HandlerMapping]'}, + 'document_root': {'key': 'documentRoot', 'type': 'str'}, + 'scm_type': {'key': 'scmType', 'type': 'str'}, + 'use32_bit_worker_process': {'key': 'use32BitWorkerProcess', 'type': 'bool'}, + 'web_sockets_enabled': {'key': 'webSocketsEnabled', 'type': 'bool'}, + 'always_on': {'key': 'alwaysOn', 'type': 'bool'}, + 'java_version': {'key': 'javaVersion', 'type': 'str'}, + 'java_container': {'key': 'javaContainer', 'type': 'str'}, + 'java_container_version': {'key': 'javaContainerVersion', 'type': 'str'}, + 'app_command_line': {'key': 'appCommandLine', 'type': 'str'}, + 'managed_pipeline_mode': {'key': 'managedPipelineMode', 'type': 'str'}, + 'virtual_applications': {'key': 'virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'loadBalancing', 'type': 'str'}, + 'experiments': {'key': 'experiments', 'type': 'Experiments'}, + 'limits': {'key': 'limits', 'type': 'SiteLimits'}, + 'auto_heal_enabled': {'key': 'autoHealEnabled', 'type': 'bool'}, + 'auto_heal_rules': {'key': 'autoHealRules', 'type': 'AutoHealRules'}, + 'tracing_options': {'key': 'tracingOptions', 'type': 'str'}, + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'vnet_route_all_enabled': {'key': 'vnetRouteAllEnabled', 'type': 'bool'}, + 'vnet_private_ports_count': {'key': 'vnetPrivatePortsCount', 'type': 'int'}, + 'cors': {'key': 'cors', 'type': 'CorsSettings'}, + 'push': {'key': 'push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'api_management_config': {'key': 'apiManagementConfig', 'type': 'ApiManagementConfig'}, + 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'managed_service_identity_id': {'key': 'managedServiceIdentityId', 'type': 'int'}, + 'x_managed_service_identity_id': {'key': 'xManagedServiceIdentityId', 'type': 'int'}, + 'key_vault_reference_identity': {'key': 'keyVaultReferenceIdentity', 'type': 'str'}, + 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions': {'key': 'scmIpSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions_use_main': {'key': 'scmIpSecurityRestrictionsUseMain', 'type': 'bool'}, + 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + 'scm_min_tls_version': {'key': 'scmMinTlsVersion', 'type': 'str'}, + 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, + 'pre_warmed_instance_count': {'key': 'preWarmedInstanceCount', 'type': 'int'}, + 'function_app_scale_limit': {'key': 'functionAppScaleLimit', 'type': 'int'}, + 'health_check_path': {'key': 'healthCheckPath', 'type': 'str'}, + 'functions_runtime_scale_monitoring_enabled': {'key': 'functionsRuntimeScaleMonitoringEnabled', 'type': 'bool'}, + 'website_time_zone': {'key': 'websiteTimeZone', 'type': 'str'}, + 'minimum_elastic_instance_count': {'key': 'minimumElasticInstanceCount', 'type': 'int'}, + } + + def __init__( + self, + *, + number_of_workers: Optional[int] = None, + default_documents: Optional[List[str]] = None, + net_framework_version: Optional[str] = "v4.6", + php_version: Optional[str] = None, + python_version: Optional[str] = None, + node_version: Optional[str] = None, + power_shell_version: Optional[str] = None, + linux_fx_version: Optional[str] = None, + windows_fx_version: Optional[str] = None, + request_tracing_enabled: Optional[bool] = None, + request_tracing_expiration_time: Optional[datetime.datetime] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + http_logging_enabled: Optional[bool] = None, + logs_directory_size_limit: Optional[int] = None, + detailed_error_logging_enabled: Optional[bool] = None, + publishing_username: Optional[str] = None, + app_settings: Optional[List["NameValuePair"]] = None, + azure_storage_accounts: Optional[Dict[str, "AzureStorageInfoValue"]] = None, + connection_strings: Optional[List["ConnStringInfo"]] = None, + handler_mappings: Optional[List["HandlerMapping"]] = None, + document_root: Optional[str] = None, + scm_type: Optional[Union[str, "ScmType"]] = None, + use32_bit_worker_process: Optional[bool] = None, + web_sockets_enabled: Optional[bool] = None, + always_on: Optional[bool] = None, + java_version: Optional[str] = None, + java_container: Optional[str] = None, + java_container_version: Optional[str] = None, + app_command_line: Optional[str] = None, + managed_pipeline_mode: Optional[Union[str, "ManagedPipelineMode"]] = None, + virtual_applications: Optional[List["VirtualApplication"]] = None, + load_balancing: Optional[Union[str, "SiteLoadBalancing"]] = None, + experiments: Optional["Experiments"] = None, + limits: Optional["SiteLimits"] = None, + auto_heal_enabled: Optional[bool] = None, + auto_heal_rules: Optional["AutoHealRules"] = None, + tracing_options: Optional[str] = None, + vnet_name: Optional[str] = None, + vnet_route_all_enabled: Optional[bool] = None, + vnet_private_ports_count: Optional[int] = None, + cors: Optional["CorsSettings"] = None, + push: Optional["PushSettings"] = None, + api_definition: Optional["ApiDefinitionInfo"] = None, + api_management_config: Optional["ApiManagementConfig"] = None, + auto_swap_slot_name: Optional[str] = None, + local_my_sql_enabled: Optional[bool] = False, + managed_service_identity_id: Optional[int] = None, + x_managed_service_identity_id: Optional[int] = None, + key_vault_reference_identity: Optional[str] = None, + ip_security_restrictions: Optional[List["IpSecurityRestriction"]] = None, + scm_ip_security_restrictions: Optional[List["IpSecurityRestriction"]] = None, + scm_ip_security_restrictions_use_main: Optional[bool] = None, + http20_enabled: Optional[bool] = True, + min_tls_version: Optional[Union[str, "SupportedTlsVersions"]] = None, + scm_min_tls_version: Optional[Union[str, "SupportedTlsVersions"]] = None, + ftps_state: Optional[Union[str, "FtpsState"]] = None, + pre_warmed_instance_count: Optional[int] = None, + function_app_scale_limit: Optional[int] = None, + health_check_path: Optional[str] = None, + functions_runtime_scale_monitoring_enabled: Optional[bool] = None, + website_time_zone: Optional[str] = None, + minimum_elastic_instance_count: Optional[int] = None, + **kwargs + ): + super(SiteConfig, self).__init__(**kwargs) + self.number_of_workers = number_of_workers + self.default_documents = default_documents + self.net_framework_version = net_framework_version + self.php_version = php_version + self.python_version = python_version + self.node_version = node_version + self.power_shell_version = power_shell_version + self.linux_fx_version = linux_fx_version + self.windows_fx_version = windows_fx_version + self.request_tracing_enabled = request_tracing_enabled + self.request_tracing_expiration_time = request_tracing_expiration_time + self.remote_debugging_enabled = remote_debugging_enabled + self.remote_debugging_version = remote_debugging_version + self.http_logging_enabled = http_logging_enabled + self.logs_directory_size_limit = logs_directory_size_limit + self.detailed_error_logging_enabled = detailed_error_logging_enabled + self.publishing_username = publishing_username + self.app_settings = app_settings + self.azure_storage_accounts = azure_storage_accounts + self.connection_strings = connection_strings + self.machine_key = None + self.handler_mappings = handler_mappings + self.document_root = document_root + self.scm_type = scm_type + self.use32_bit_worker_process = use32_bit_worker_process + self.web_sockets_enabled = web_sockets_enabled + self.always_on = always_on + self.java_version = java_version + self.java_container = java_container + self.java_container_version = java_container_version + self.app_command_line = app_command_line + self.managed_pipeline_mode = managed_pipeline_mode + self.virtual_applications = virtual_applications + self.load_balancing = load_balancing + self.experiments = experiments + self.limits = limits + self.auto_heal_enabled = auto_heal_enabled + self.auto_heal_rules = auto_heal_rules + self.tracing_options = tracing_options + self.vnet_name = vnet_name + self.vnet_route_all_enabled = vnet_route_all_enabled + self.vnet_private_ports_count = vnet_private_ports_count + self.cors = cors + self.push = push + self.api_definition = api_definition + self.api_management_config = api_management_config + self.auto_swap_slot_name = auto_swap_slot_name + self.local_my_sql_enabled = local_my_sql_enabled + self.managed_service_identity_id = managed_service_identity_id + self.x_managed_service_identity_id = x_managed_service_identity_id + self.key_vault_reference_identity = key_vault_reference_identity + self.ip_security_restrictions = ip_security_restrictions + self.scm_ip_security_restrictions = scm_ip_security_restrictions + self.scm_ip_security_restrictions_use_main = scm_ip_security_restrictions_use_main + self.http20_enabled = http20_enabled + self.min_tls_version = min_tls_version + self.scm_min_tls_version = scm_min_tls_version + self.ftps_state = ftps_state + self.pre_warmed_instance_count = pre_warmed_instance_count + self.function_app_scale_limit = function_app_scale_limit + self.health_check_path = health_check_path + self.functions_runtime_scale_monitoring_enabled = functions_runtime_scale_monitoring_enabled + self.website_time_zone = website_time_zone + self.minimum_elastic_instance_count = minimum_elastic_instance_count + + +class SiteConfigPropertiesDictionary(msrest.serialization.Model): + """Site config properties dictionary. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar use32_bit_worker_process: :code:`true` if use32BitWorkerProcess should be + set to true for the stack; otherwise, :code:`false`. + :vartype use32_bit_worker_process: bool + :ivar linux_fx_version: LinuxFxVersion configuration setting. + :vartype linux_fx_version: str + :ivar java_version: JavaVersion configuration setting. + :vartype java_version: str + :ivar power_shell_version: PowerShellVersion configuration setting. + :vartype power_shell_version: str + """ + + _validation = { + 'use32_bit_worker_process': {'readonly': True}, + 'linux_fx_version': {'readonly': True}, + 'java_version': {'readonly': True}, + 'power_shell_version': {'readonly': True}, + } + + _attribute_map = { + 'use32_bit_worker_process': {'key': 'use32BitWorkerProcess', 'type': 'bool'}, + 'linux_fx_version': {'key': 'linuxFxVersion', 'type': 'str'}, + 'java_version': {'key': 'javaVersion', 'type': 'str'}, + 'power_shell_version': {'key': 'powerShellVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SiteConfigPropertiesDictionary, self).__init__(**kwargs) + self.use32_bit_worker_process = None + self.linux_fx_version = None + self.java_version = None + self.power_shell_version = None + + +class SiteConfigResource(ProxyOnlyResource): + """Web app configuration ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param number_of_workers: Number of workers. + :type number_of_workers: int + :param default_documents: Default documents. + :type default_documents: list[str] + :param net_framework_version: .NET Framework version. + :type net_framework_version: str + :param php_version: Version of PHP. + :type php_version: str + :param python_version: Version of Python. + :type python_version: str + :param node_version: Version of Node.js. + :type node_version: str + :param power_shell_version: Version of PowerShell. + :type power_shell_version: str + :param linux_fx_version: Linux App Framework and version. + :type linux_fx_version: str + :param windows_fx_version: Xenon App Framework and version. + :type windows_fx_version: str + :param request_tracing_enabled: :code:`true` if request tracing is enabled; + otherwise, :code:`false`. + :type request_tracing_enabled: bool + :param request_tracing_expiration_time: Request tracing expiration time. + :type request_tracing_expiration_time: ~datetime.datetime + :param remote_debugging_enabled: :code:`true` if remote debugging is enabled; + otherwise, :code:`false`. + :type remote_debugging_enabled: bool + :param remote_debugging_version: Remote debugging version. + :type remote_debugging_version: str + :param http_logging_enabled: :code:`true` if HTTP logging is enabled; otherwise, + :code:`false`. + :type http_logging_enabled: bool + :param logs_directory_size_limit: HTTP logs directory size limit. + :type logs_directory_size_limit: int + :param detailed_error_logging_enabled: :code:`true` if detailed error logging is + enabled; otherwise, :code:`false`. + :type detailed_error_logging_enabled: bool + :param publishing_username: Publishing user name. + :type publishing_username: str + :param app_settings: Application settings. + :type app_settings: list[~azure.mgmt.web.v2020_12_01.models.NameValuePair] + :param azure_storage_accounts: List of Azure Storage Accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.v2020_12_01.models.AzureStorageInfoValue] + :param connection_strings: Connection strings. + :type connection_strings: list[~azure.mgmt.web.v2020_12_01.models.ConnStringInfo] + :ivar machine_key: Site MachineKey. + :vartype machine_key: ~azure.mgmt.web.v2020_12_01.models.SiteMachineKey + :param handler_mappings: Handler mappings. + :type handler_mappings: list[~azure.mgmt.web.v2020_12_01.models.HandlerMapping] + :param document_root: Document root. + :type document_root: str + :param scm_type: SCM type. Possible values include: "None", "Dropbox", "Tfs", "LocalGit", + "GitHub", "CodePlexGit", "CodePlexHg", "BitbucketGit", "BitbucketHg", "ExternalGit", + "ExternalHg", "OneDrive", "VSO", "VSTSRM". + :type scm_type: str or ~azure.mgmt.web.v2020_12_01.models.ScmType + :param use32_bit_worker_process: :code:`true` to use 32-bit worker process; + otherwise, :code:`false`. + :type use32_bit_worker_process: bool + :param web_sockets_enabled: :code:`true` if WebSocket is enabled; otherwise, + :code:`false`. + :type web_sockets_enabled: bool + :param always_on: :code:`true` if Always On is enabled; otherwise, + :code:`false`. + :type always_on: bool + :param java_version: Java version. + :type java_version: str + :param java_container: Java container. + :type java_container: str + :param java_container_version: Java container version. + :type java_container_version: str + :param app_command_line: App command line to launch. + :type app_command_line: str + :param managed_pipeline_mode: Managed pipeline mode. Possible values include: "Integrated", + "Classic". + :type managed_pipeline_mode: str or ~azure.mgmt.web.v2020_12_01.models.ManagedPipelineMode + :param virtual_applications: Virtual applications. + :type virtual_applications: list[~azure.mgmt.web.v2020_12_01.models.VirtualApplication] + :param load_balancing: Site load balancing. Possible values include: "WeightedRoundRobin", + "LeastRequests", "LeastResponseTime", "WeightedTotalTraffic", "RequestHash", + "PerSiteRoundRobin". + :type load_balancing: str or ~azure.mgmt.web.v2020_12_01.models.SiteLoadBalancing + :param experiments: This is work around for polymorphic types. + :type experiments: ~azure.mgmt.web.v2020_12_01.models.Experiments + :param limits: Site limits. + :type limits: ~azure.mgmt.web.v2020_12_01.models.SiteLimits + :param auto_heal_enabled: :code:`true` if Auto Heal is enabled; otherwise, + :code:`false`. + :type auto_heal_enabled: bool + :param auto_heal_rules: Auto Heal rules. + :type auto_heal_rules: ~azure.mgmt.web.v2020_12_01.models.AutoHealRules + :param tracing_options: Tracing options. + :type tracing_options: str + :param vnet_name: Virtual Network name. + :type vnet_name: str + :param vnet_route_all_enabled: Virtual Network Route All enabled. This causes all outbound + traffic to have Virtual Network Security Groups and User Defined Routes applied. + :type vnet_route_all_enabled: bool + :param vnet_private_ports_count: The number of private ports assigned to this app. These will + be assigned dynamically on runtime. + :type vnet_private_ports_count: int + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.web.v2020_12_01.models.CorsSettings + :param push: Push endpoint settings. + :type push: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :param api_definition: Information about the formal API definition for the app. + :type api_definition: ~azure.mgmt.web.v2020_12_01.models.ApiDefinitionInfo + :param api_management_config: Azure API management settings linked to the app. + :type api_management_config: ~azure.mgmt.web.v2020_12_01.models.ApiManagementConfig + :param auto_swap_slot_name: Auto-swap slot name. + :type auto_swap_slot_name: str + :param local_my_sql_enabled: :code:`true` to enable local MySQL; otherwise, + :code:`false`. + :type local_my_sql_enabled: bool + :param managed_service_identity_id: Managed Service Identity Id. + :type managed_service_identity_id: int + :param x_managed_service_identity_id: Explicit Managed Service Identity Id. + :type x_managed_service_identity_id: int + :param key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :type key_vault_reference_identity: str + :param ip_security_restrictions: IP security restrictions for main. + :type ip_security_restrictions: list[~azure.mgmt.web.v2020_12_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.v2020_12_01.models.IpSecurityRestriction] + :param scm_ip_security_restrictions_use_main: IP security restrictions for scm to use main. + :type scm_ip_security_restrictions_use_main: bool + :param http20_enabled: Http20Enabled: configures a web site to allow clients to connect over + http2.0. + :type http20_enabled: bool + :param min_tls_version: MinTlsVersion: configures the minimum version of TLS required for SSL + requests. Possible values include: "1.0", "1.1", "1.2". + :type min_tls_version: str or ~azure.mgmt.web.v2020_12_01.models.SupportedTlsVersions + :param scm_min_tls_version: ScmMinTlsVersion: configures the minimum version of TLS required + for SSL requests for SCM site. Possible values include: "1.0", "1.1", "1.2". + :type scm_min_tls_version: str or ~azure.mgmt.web.v2020_12_01.models.SupportedTlsVersions + :param ftps_state: State of FTP / FTPS service. Possible values include: "AllAllowed", + "FtpsOnly", "Disabled". + :type ftps_state: str or ~azure.mgmt.web.v2020_12_01.models.FtpsState + :param pre_warmed_instance_count: Number of preWarmed instances. + This setting only applies to the Consumption and Elastic Plans. + :type pre_warmed_instance_count: int + :param function_app_scale_limit: Maximum number of workers that a site can scale out to. + This setting only applies to the Consumption and Elastic Premium Plans. + :type function_app_scale_limit: int + :param health_check_path: Health check path. + :type health_check_path: str + :param functions_runtime_scale_monitoring_enabled: Gets or sets a value indicating whether + functions runtime scale monitoring is enabled. When enabled, + the ScaleController will not monitor event sources directly, but will instead call to the + runtime to get scale status. + :type functions_runtime_scale_monitoring_enabled: bool + :param website_time_zone: Sets the time zone a site uses for generating timestamps. Compatible + with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence + over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a + quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, + expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows + NT\CurrentVersion\Time Zones. + :type website_time_zone: str + :param minimum_elastic_instance_count: Number of minimum instance count for a site + This setting only applies to the Elastic Plans. + :type minimum_elastic_instance_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'machine_key': {'readonly': True}, + 'pre_warmed_instance_count': {'maximum': 10, 'minimum': 0}, + 'function_app_scale_limit': {'minimum': 0}, + 'minimum_elastic_instance_count': {'maximum': 20, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'number_of_workers': {'key': 'properties.numberOfWorkers', 'type': 'int'}, + 'default_documents': {'key': 'properties.defaultDocuments', 'type': '[str]'}, + 'net_framework_version': {'key': 'properties.netFrameworkVersion', 'type': 'str'}, + 'php_version': {'key': 'properties.phpVersion', 'type': 'str'}, + 'python_version': {'key': 'properties.pythonVersion', 'type': 'str'}, + 'node_version': {'key': 'properties.nodeVersion', 'type': 'str'}, + 'power_shell_version': {'key': 'properties.powerShellVersion', 'type': 'str'}, + 'linux_fx_version': {'key': 'properties.linuxFxVersion', 'type': 'str'}, + 'windows_fx_version': {'key': 'properties.windowsFxVersion', 'type': 'str'}, + 'request_tracing_enabled': {'key': 'properties.requestTracingEnabled', 'type': 'bool'}, + 'request_tracing_expiration_time': {'key': 'properties.requestTracingExpirationTime', 'type': 'iso-8601'}, + 'remote_debugging_enabled': {'key': 'properties.remoteDebuggingEnabled', 'type': 'bool'}, + 'remote_debugging_version': {'key': 'properties.remoteDebuggingVersion', 'type': 'str'}, + 'http_logging_enabled': {'key': 'properties.httpLoggingEnabled', 'type': 'bool'}, + 'logs_directory_size_limit': {'key': 'properties.logsDirectorySizeLimit', 'type': 'int'}, + 'detailed_error_logging_enabled': {'key': 'properties.detailedErrorLoggingEnabled', 'type': 'bool'}, + 'publishing_username': {'key': 'properties.publishingUsername', 'type': 'str'}, + 'app_settings': {'key': 'properties.appSettings', 'type': '[NameValuePair]'}, + 'azure_storage_accounts': {'key': 'properties.azureStorageAccounts', 'type': '{AzureStorageInfoValue}'}, + 'connection_strings': {'key': 'properties.connectionStrings', 'type': '[ConnStringInfo]'}, + 'machine_key': {'key': 'properties.machineKey', 'type': 'SiteMachineKey'}, + 'handler_mappings': {'key': 'properties.handlerMappings', 'type': '[HandlerMapping]'}, + 'document_root': {'key': 'properties.documentRoot', 'type': 'str'}, + 'scm_type': {'key': 'properties.scmType', 'type': 'str'}, + 'use32_bit_worker_process': {'key': 'properties.use32BitWorkerProcess', 'type': 'bool'}, + 'web_sockets_enabled': {'key': 'properties.webSocketsEnabled', 'type': 'bool'}, + 'always_on': {'key': 'properties.alwaysOn', 'type': 'bool'}, + 'java_version': {'key': 'properties.javaVersion', 'type': 'str'}, + 'java_container': {'key': 'properties.javaContainer', 'type': 'str'}, + 'java_container_version': {'key': 'properties.javaContainerVersion', 'type': 'str'}, + 'app_command_line': {'key': 'properties.appCommandLine', 'type': 'str'}, + 'managed_pipeline_mode': {'key': 'properties.managedPipelineMode', 'type': 'str'}, + 'virtual_applications': {'key': 'properties.virtualApplications', 'type': '[VirtualApplication]'}, + 'load_balancing': {'key': 'properties.loadBalancing', 'type': 'str'}, + 'experiments': {'key': 'properties.experiments', 'type': 'Experiments'}, + 'limits': {'key': 'properties.limits', 'type': 'SiteLimits'}, + 'auto_heal_enabled': {'key': 'properties.autoHealEnabled', 'type': 'bool'}, + 'auto_heal_rules': {'key': 'properties.autoHealRules', 'type': 'AutoHealRules'}, + 'tracing_options': {'key': 'properties.tracingOptions', 'type': 'str'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_route_all_enabled': {'key': 'properties.vnetRouteAllEnabled', 'type': 'bool'}, + 'vnet_private_ports_count': {'key': 'properties.vnetPrivatePortsCount', 'type': 'int'}, + 'cors': {'key': 'properties.cors', 'type': 'CorsSettings'}, + 'push': {'key': 'properties.push', 'type': 'PushSettings'}, + 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, + 'api_management_config': {'key': 'properties.apiManagementConfig', 'type': 'ApiManagementConfig'}, + 'auto_swap_slot_name': {'key': 'properties.autoSwapSlotName', 'type': 'str'}, + 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + 'managed_service_identity_id': {'key': 'properties.managedServiceIdentityId', 'type': 'int'}, + 'x_managed_service_identity_id': {'key': 'properties.xManagedServiceIdentityId', 'type': 'int'}, + 'key_vault_reference_identity': {'key': 'properties.keyVaultReferenceIdentity', 'type': 'str'}, + 'ip_security_restrictions': {'key': 'properties.ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions': {'key': 'properties.scmIpSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions_use_main': {'key': 'properties.scmIpSecurityRestrictionsUseMain', 'type': 'bool'}, + 'http20_enabled': {'key': 'properties.http20Enabled', 'type': 'bool'}, + 'min_tls_version': {'key': 'properties.minTlsVersion', 'type': 'str'}, + 'scm_min_tls_version': {'key': 'properties.scmMinTlsVersion', 'type': 'str'}, + 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, + 'pre_warmed_instance_count': {'key': 'properties.preWarmedInstanceCount', 'type': 'int'}, + 'function_app_scale_limit': {'key': 'properties.functionAppScaleLimit', 'type': 'int'}, + 'health_check_path': {'key': 'properties.healthCheckPath', 'type': 'str'}, + 'functions_runtime_scale_monitoring_enabled': {'key': 'properties.functionsRuntimeScaleMonitoringEnabled', 'type': 'bool'}, + 'website_time_zone': {'key': 'properties.websiteTimeZone', 'type': 'str'}, + 'minimum_elastic_instance_count': {'key': 'properties.minimumElasticInstanceCount', 'type': 'int'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + number_of_workers: Optional[int] = None, + default_documents: Optional[List[str]] = None, + net_framework_version: Optional[str] = "v4.6", + php_version: Optional[str] = None, + python_version: Optional[str] = None, + node_version: Optional[str] = None, + power_shell_version: Optional[str] = None, + linux_fx_version: Optional[str] = None, + windows_fx_version: Optional[str] = None, + request_tracing_enabled: Optional[bool] = None, + request_tracing_expiration_time: Optional[datetime.datetime] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + http_logging_enabled: Optional[bool] = None, + logs_directory_size_limit: Optional[int] = None, + detailed_error_logging_enabled: Optional[bool] = None, + publishing_username: Optional[str] = None, + app_settings: Optional[List["NameValuePair"]] = None, + azure_storage_accounts: Optional[Dict[str, "AzureStorageInfoValue"]] = None, + connection_strings: Optional[List["ConnStringInfo"]] = None, + handler_mappings: Optional[List["HandlerMapping"]] = None, + document_root: Optional[str] = None, + scm_type: Optional[Union[str, "ScmType"]] = None, + use32_bit_worker_process: Optional[bool] = None, + web_sockets_enabled: Optional[bool] = None, + always_on: Optional[bool] = None, + java_version: Optional[str] = None, + java_container: Optional[str] = None, + java_container_version: Optional[str] = None, + app_command_line: Optional[str] = None, + managed_pipeline_mode: Optional[Union[str, "ManagedPipelineMode"]] = None, + virtual_applications: Optional[List["VirtualApplication"]] = None, + load_balancing: Optional[Union[str, "SiteLoadBalancing"]] = None, + experiments: Optional["Experiments"] = None, + limits: Optional["SiteLimits"] = None, + auto_heal_enabled: Optional[bool] = None, + auto_heal_rules: Optional["AutoHealRules"] = None, + tracing_options: Optional[str] = None, + vnet_name: Optional[str] = None, + vnet_route_all_enabled: Optional[bool] = None, + vnet_private_ports_count: Optional[int] = None, + cors: Optional["CorsSettings"] = None, + push: Optional["PushSettings"] = None, + api_definition: Optional["ApiDefinitionInfo"] = None, + api_management_config: Optional["ApiManagementConfig"] = None, + auto_swap_slot_name: Optional[str] = None, + local_my_sql_enabled: Optional[bool] = False, + managed_service_identity_id: Optional[int] = None, + x_managed_service_identity_id: Optional[int] = None, + key_vault_reference_identity: Optional[str] = None, + ip_security_restrictions: Optional[List["IpSecurityRestriction"]] = None, + scm_ip_security_restrictions: Optional[List["IpSecurityRestriction"]] = None, + scm_ip_security_restrictions_use_main: Optional[bool] = None, + http20_enabled: Optional[bool] = True, + min_tls_version: Optional[Union[str, "SupportedTlsVersions"]] = None, + scm_min_tls_version: Optional[Union[str, "SupportedTlsVersions"]] = None, + ftps_state: Optional[Union[str, "FtpsState"]] = None, + pre_warmed_instance_count: Optional[int] = None, + function_app_scale_limit: Optional[int] = None, + health_check_path: Optional[str] = None, + functions_runtime_scale_monitoring_enabled: Optional[bool] = None, + website_time_zone: Optional[str] = None, + minimum_elastic_instance_count: Optional[int] = None, + **kwargs + ): + super(SiteConfigResource, self).__init__(kind=kind, **kwargs) + self.number_of_workers = number_of_workers + self.default_documents = default_documents + self.net_framework_version = net_framework_version + self.php_version = php_version + self.python_version = python_version + self.node_version = node_version + self.power_shell_version = power_shell_version + self.linux_fx_version = linux_fx_version + self.windows_fx_version = windows_fx_version + self.request_tracing_enabled = request_tracing_enabled + self.request_tracing_expiration_time = request_tracing_expiration_time + self.remote_debugging_enabled = remote_debugging_enabled + self.remote_debugging_version = remote_debugging_version + self.http_logging_enabled = http_logging_enabled + self.logs_directory_size_limit = logs_directory_size_limit + self.detailed_error_logging_enabled = detailed_error_logging_enabled + self.publishing_username = publishing_username + self.app_settings = app_settings + self.azure_storage_accounts = azure_storage_accounts + self.connection_strings = connection_strings + self.machine_key = None + self.handler_mappings = handler_mappings + self.document_root = document_root + self.scm_type = scm_type + self.use32_bit_worker_process = use32_bit_worker_process + self.web_sockets_enabled = web_sockets_enabled + self.always_on = always_on + self.java_version = java_version + self.java_container = java_container + self.java_container_version = java_container_version + self.app_command_line = app_command_line + self.managed_pipeline_mode = managed_pipeline_mode + self.virtual_applications = virtual_applications + self.load_balancing = load_balancing + self.experiments = experiments + self.limits = limits + self.auto_heal_enabled = auto_heal_enabled + self.auto_heal_rules = auto_heal_rules + self.tracing_options = tracing_options + self.vnet_name = vnet_name + self.vnet_route_all_enabled = vnet_route_all_enabled + self.vnet_private_ports_count = vnet_private_ports_count + self.cors = cors + self.push = push + self.api_definition = api_definition + self.api_management_config = api_management_config + self.auto_swap_slot_name = auto_swap_slot_name + self.local_my_sql_enabled = local_my_sql_enabled + self.managed_service_identity_id = managed_service_identity_id + self.x_managed_service_identity_id = x_managed_service_identity_id + self.key_vault_reference_identity = key_vault_reference_identity + self.ip_security_restrictions = ip_security_restrictions + self.scm_ip_security_restrictions = scm_ip_security_restrictions + self.scm_ip_security_restrictions_use_main = scm_ip_security_restrictions_use_main + self.http20_enabled = http20_enabled + self.min_tls_version = min_tls_version + self.scm_min_tls_version = scm_min_tls_version + self.ftps_state = ftps_state + self.pre_warmed_instance_count = pre_warmed_instance_count + self.function_app_scale_limit = function_app_scale_limit + self.health_check_path = health_check_path + self.functions_runtime_scale_monitoring_enabled = functions_runtime_scale_monitoring_enabled + self.website_time_zone = website_time_zone + self.minimum_elastic_instance_count = minimum_elastic_instance_count + + +class SiteConfigResourceCollection(msrest.serialization.Model): + """Collection of site configurations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SiteConfigResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SiteConfigResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["SiteConfigResource"], + **kwargs + ): + super(SiteConfigResourceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class SiteConfigurationSnapshotInfo(ProxyOnlyResource): + """A snapshot of a web app configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar time: The time the snapshot was taken. + :vartype time: ~datetime.datetime + :ivar snapshot_id: The id of the snapshot. + :vartype snapshot_id: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'time': {'readonly': True}, + 'snapshot_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time': {'key': 'properties.time', 'type': 'iso-8601'}, + 'snapshot_id': {'key': 'properties.snapshotId', 'type': 'int'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) + self.time = None + self.snapshot_id = None + + +class SiteConfigurationSnapshotInfoCollection(msrest.serialization.Model): + """Collection of metadata for the app configuration snapshots that can be restored. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SiteConfigurationSnapshotInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["SiteConfigurationSnapshotInfo"], + **kwargs + ): + super(SiteConfigurationSnapshotInfoCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class SiteExtensionInfo(ProxyOnlyResource): + """Site Extension Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param extension_id: Site extension ID. + :type extension_id: str + :param title: + :type title: str + :param extension_type: Site extension type. Possible values include: "Gallery", "WebRoot". + :type extension_type: str or ~azure.mgmt.web.v2020_12_01.models.SiteExtensionType + :param summary: Summary description. + :type summary: str + :param description: Detailed description. + :type description: str + :param version: Version information. + :type version: str + :param extension_url: Extension URL. + :type extension_url: str + :param project_url: Project URL. + :type project_url: str + :param icon_url: Icon URL. + :type icon_url: str + :param license_url: License URL. + :type license_url: str + :param feed_url: Feed URL. + :type feed_url: str + :param authors: List of authors. + :type authors: list[str] + :param installer_command_line_params: Installer command line parameters. + :type installer_command_line_params: str + :param published_date_time: Published timestamp. + :type published_date_time: ~datetime.datetime + :param download_count: Count of downloads. + :type download_count: int + :param local_is_latest_version: :code:`true` if the local version is the latest + version; :code:`false` otherwise. + :type local_is_latest_version: bool + :param local_path: Local path. + :type local_path: str + :param installed_date_time: Installed timestamp. + :type installed_date_time: ~datetime.datetime + :param provisioning_state: Provisioning state. + :type provisioning_state: str + :param comment: Site Extension comment. + :type comment: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'extension_id': {'key': 'properties.extension_id', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'extension_type': {'key': 'properties.extension_type', 'type': 'str'}, + 'summary': {'key': 'properties.summary', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'extension_url': {'key': 'properties.extension_url', 'type': 'str'}, + 'project_url': {'key': 'properties.project_url', 'type': 'str'}, + 'icon_url': {'key': 'properties.icon_url', 'type': 'str'}, + 'license_url': {'key': 'properties.license_url', 'type': 'str'}, + 'feed_url': {'key': 'properties.feed_url', 'type': 'str'}, + 'authors': {'key': 'properties.authors', 'type': '[str]'}, + 'installer_command_line_params': {'key': 'properties.installer_command_line_params', 'type': 'str'}, + 'published_date_time': {'key': 'properties.published_date_time', 'type': 'iso-8601'}, + 'download_count': {'key': 'properties.download_count', 'type': 'int'}, + 'local_is_latest_version': {'key': 'properties.local_is_latest_version', 'type': 'bool'}, + 'local_path': {'key': 'properties.local_path', 'type': 'str'}, + 'installed_date_time': {'key': 'properties.installed_date_time', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'comment': {'key': 'properties.comment', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + extension_id: Optional[str] = None, + title: Optional[str] = None, + extension_type: Optional[Union[str, "SiteExtensionType"]] = None, + summary: Optional[str] = None, + description: Optional[str] = None, + version: Optional[str] = None, + extension_url: Optional[str] = None, + project_url: Optional[str] = None, + icon_url: Optional[str] = None, + license_url: Optional[str] = None, + feed_url: Optional[str] = None, + authors: Optional[List[str]] = None, + installer_command_line_params: Optional[str] = None, + published_date_time: Optional[datetime.datetime] = None, + download_count: Optional[int] = None, + local_is_latest_version: Optional[bool] = None, + local_path: Optional[str] = None, + installed_date_time: Optional[datetime.datetime] = None, + provisioning_state: Optional[str] = None, + comment: Optional[str] = None, + **kwargs + ): + super(SiteExtensionInfo, self).__init__(kind=kind, **kwargs) + self.extension_id = extension_id + self.title = title + self.extension_type = extension_type + self.summary = summary + self.description = description + self.version = version + self.extension_url = extension_url + self.project_url = project_url + self.icon_url = icon_url + self.license_url = license_url + self.feed_url = feed_url + self.authors = authors + self.installer_command_line_params = installer_command_line_params + self.published_date_time = published_date_time + self.download_count = download_count + self.local_is_latest_version = local_is_latest_version + self.local_path = local_path + self.installed_date_time = installed_date_time + self.provisioning_state = provisioning_state + self.comment = comment + + +class SiteExtensionInfoCollection(msrest.serialization.Model): + """Collection of Kudu site extension information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SiteExtensionInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["SiteExtensionInfo"], + **kwargs + ): + super(SiteExtensionInfoCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class SiteLimits(msrest.serialization.Model): + """Metric limits set on an app. + + :param max_percentage_cpu: Maximum allowed CPU usage percentage. + :type max_percentage_cpu: float + :param max_memory_in_mb: Maximum allowed memory usage in MB. + :type max_memory_in_mb: long + :param max_disk_size_in_mb: Maximum allowed disk size usage in MB. + :type max_disk_size_in_mb: long + """ + + _attribute_map = { + 'max_percentage_cpu': {'key': 'maxPercentageCpu', 'type': 'float'}, + 'max_memory_in_mb': {'key': 'maxMemoryInMb', 'type': 'long'}, + 'max_disk_size_in_mb': {'key': 'maxDiskSizeInMb', 'type': 'long'}, + } + + def __init__( + self, + *, + max_percentage_cpu: Optional[float] = None, + max_memory_in_mb: Optional[int] = None, + max_disk_size_in_mb: Optional[int] = None, + **kwargs + ): + super(SiteLimits, self).__init__(**kwargs) + self.max_percentage_cpu = max_percentage_cpu + self.max_memory_in_mb = max_memory_in_mb + self.max_disk_size_in_mb = max_disk_size_in_mb + + +class SiteLogsConfig(ProxyOnlyResource): + """Configuration of App Service site logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param application_logs: Application logs configuration. + :type application_logs: ~azure.mgmt.web.v2020_12_01.models.ApplicationLogsConfig + :param http_logs: HTTP logs configuration. + :type http_logs: ~azure.mgmt.web.v2020_12_01.models.HttpLogsConfig + :param failed_requests_tracing: Failed requests tracing configuration. + :type failed_requests_tracing: ~azure.mgmt.web.v2020_12_01.models.EnabledConfig + :param detailed_error_messages: Detailed error messages configuration. + :type detailed_error_messages: ~azure.mgmt.web.v2020_12_01.models.EnabledConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'application_logs': {'key': 'properties.applicationLogs', 'type': 'ApplicationLogsConfig'}, + 'http_logs': {'key': 'properties.httpLogs', 'type': 'HttpLogsConfig'}, + 'failed_requests_tracing': {'key': 'properties.failedRequestsTracing', 'type': 'EnabledConfig'}, + 'detailed_error_messages': {'key': 'properties.detailedErrorMessages', 'type': 'EnabledConfig'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + application_logs: Optional["ApplicationLogsConfig"] = None, + http_logs: Optional["HttpLogsConfig"] = None, + failed_requests_tracing: Optional["EnabledConfig"] = None, + detailed_error_messages: Optional["EnabledConfig"] = None, + **kwargs + ): + super(SiteLogsConfig, self).__init__(kind=kind, **kwargs) + self.application_logs = application_logs + self.http_logs = http_logs + self.failed_requests_tracing = failed_requests_tracing + self.detailed_error_messages = detailed_error_messages + + +class SiteMachineKey(msrest.serialization.Model): + """MachineKey of an app. + + :param validation: MachineKey validation. + :type validation: str + :param validation_key: Validation key. + :type validation_key: str + :param decryption: Algorithm used for decryption. + :type decryption: str + :param decryption_key: Decryption key. + :type decryption_key: str + """ + + _attribute_map = { + 'validation': {'key': 'validation', 'type': 'str'}, + 'validation_key': {'key': 'validationKey', 'type': 'str'}, + 'decryption': {'key': 'decryption', 'type': 'str'}, + 'decryption_key': {'key': 'decryptionKey', 'type': 'str'}, + } + + def __init__( + self, + *, + validation: Optional[str] = None, + validation_key: Optional[str] = None, + decryption: Optional[str] = None, + decryption_key: Optional[str] = None, + **kwargs + ): + super(SiteMachineKey, self).__init__(**kwargs) + self.validation = validation + self.validation_key = validation_key + self.decryption = decryption + self.decryption_key = decryption_key + + +class SitePatchResource(ProxyOnlyResource): + """ARM resource for a site. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param identity: Managed service identity. + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :ivar state: Current state of the app. + :vartype state: str + :ivar host_names: Hostnames associated with the app. + :vartype host_names: list[str] + :ivar repository_site_name: Name of the repository site. + :vartype repository_site_name: str + :ivar usage_state: State indicating whether the app has exceeded its quota usage. Read-only. + Possible values include: "Normal", "Exceeded". + :vartype usage_state: str or ~azure.mgmt.web.v2020_12_01.models.UsageState + :param enabled: :code:`true` if the app is enabled; otherwise, + :code:`false`. Setting this value to false disables the app (takes the app + offline). + :type enabled: bool + :ivar enabled_host_names: Enabled hostnames for the app.Hostnames need to be assigned (see + HostNames) AND enabled. Otherwise, + the app is not served on those hostnames. + :vartype enabled_host_names: list[str] + :ivar availability_state: Management information availability state for the app. Possible + values include: "Normal", "Limited", "DisasterRecoveryMode". + :vartype availability_state: str or ~azure.mgmt.web.v2020_12_01.models.SiteAvailabilityState + :param host_name_ssl_states: Hostname SSL states are used to manage the SSL bindings for app's + hostnames. + :type host_name_ssl_states: list[~azure.mgmt.web.v2020_12_01.models.HostNameSslState] + :param server_farm_id: Resource ID of the associated App Service plan, formatted as: + "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + :type server_farm_id: str + :param reserved: :code:`true` if reserved; otherwise, :code:`false`. + :type reserved: bool + :param is_xenon: Obsolete: Hyper-V sandbox. + :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. + :type hyper_v: bool + :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. + :vartype last_modified_time_utc: ~datetime.datetime + :param site_config: Configuration of the app. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfig + :ivar traffic_manager_host_names: Azure Traffic Manager hostnames associated with the app. + Read-only. + :vartype traffic_manager_host_names: list[str] + :param scm_site_also_stopped: :code:`true` to stop SCM (KUDU) site when the app is + stopped; otherwise, :code:`false`. The default is :code:`false`. + :type scm_site_also_stopped: bool + :ivar target_swap_slot: Specifies which deployment slot this app will swap into. Read-only. + :vartype target_swap_slot: str + :param hosting_environment_profile: App Service Environment to use for the app. + :type hosting_environment_profile: ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentProfile + :param client_affinity_enabled: :code:`true` to enable client affinity; + :code:`false` to stop sending session affinity cookies, which route client + requests in the same session to the same instance. Default is :code:`true`. + :type client_affinity_enabled: bool + :param client_cert_enabled: :code:`true` to enable client certificate + authentication (TLS mutual authentication); otherwise, :code:`false`. Default is + :code:`false`. + :type client_cert_enabled: bool + :param client_cert_mode: This composes with ClientCertEnabled setting. + + + * ClientCertEnabled: false means ClientCert is ignored. + * ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or + accepted. Possible values include: "Required", "Optional", "OptionalInteractiveUser". + :type client_cert_mode: str or ~azure.mgmt.web.v2020_12_01.models.ClientCertMode + :param client_cert_exclusion_paths: client certificate authentication comma-separated exclusion + paths. + :type client_cert_exclusion_paths: str + :param host_names_disabled: :code:`true` to disable the public hostnames of the + app; otherwise, :code:`false`. + If :code:`true`, the app is only accessible via API management process. + :type host_names_disabled: bool + :param custom_domain_verification_id: Unique identifier that verifies the custom domains + assigned to the app. Customer will add this id to a txt record for verification. + :type custom_domain_verification_id: str + :ivar outbound_ip_addresses: List of IP addresses that the app uses for outbound connections + (e.g. database access). Includes VIPs from tenants that site can be hosted with current + settings. Read-only. + :vartype outbound_ip_addresses: str + :ivar possible_outbound_ip_addresses: List of IP addresses that the app uses for outbound + connections (e.g. database access). Includes VIPs from all tenants except dataComponent. + Read-only. + :vartype possible_outbound_ip_addresses: str + :param container_size: Size of the function container. + :type container_size: int + :param daily_memory_time_quota: Maximum allowed daily memory-time quota (applicable on dynamic + apps only). + :type daily_memory_time_quota: int + :ivar suspended_till: App suspended till in case memory-time quota is exceeded. + :vartype suspended_till: ~datetime.datetime + :ivar max_number_of_workers: Maximum number of workers. + This only applies to Functions container. + :vartype max_number_of_workers: int + :param cloning_info: If specified during app creation, the app is cloned from a source app. + :type cloning_info: ~azure.mgmt.web.v2020_12_01.models.CloningInfo + :ivar resource_group: Name of the resource group the app belongs to. Read-only. + :vartype resource_group: str + :ivar is_default_container: :code:`true` if the app is a default container; + otherwise, :code:`false`. + :vartype is_default_container: bool + :ivar default_host_name: Default hostname of the app. Read-only. + :vartype default_host_name: str + :ivar slot_swap_status: Status of the last deployment slot swap operation. + :vartype slot_swap_status: ~azure.mgmt.web.v2020_12_01.models.SlotSwapStatus + :param key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :type key_vault_reference_identity: str + :param https_only: HttpsOnly: configures a web site to accept only https requests. Issues + redirect for + http requests. + :type https_only: bool + :param redundancy_mode: Site redundancy mode. Possible values include: "None", "Manual", + "Failover", "ActiveActive", "GeoRedundant". + :type redundancy_mode: str or ~azure.mgmt.web.v2020_12_01.models.RedundancyMode + :ivar in_progress_operation_id: Specifies an operation id if this site has a pending operation. + :vartype in_progress_operation_id: str + :param storage_account_required: Checks if Customer provided storage account is required. + :type storage_account_required: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'host_names': {'readonly': True}, + 'repository_site_name': {'readonly': True}, + 'usage_state': {'readonly': True}, + 'enabled_host_names': {'readonly': True}, + 'availability_state': {'readonly': True}, + 'last_modified_time_utc': {'readonly': True}, + 'traffic_manager_host_names': {'readonly': True}, + 'target_swap_slot': {'readonly': True}, + 'outbound_ip_addresses': {'readonly': True}, + 'possible_outbound_ip_addresses': {'readonly': True}, + 'suspended_till': {'readonly': True}, + 'max_number_of_workers': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'is_default_container': {'readonly': True}, + 'default_host_name': {'readonly': True}, + 'slot_swap_status': {'readonly': True}, + 'in_progress_operation_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + 'repository_site_name': {'key': 'properties.repositorySiteName', 'type': 'str'}, + 'usage_state': {'key': 'properties.usageState', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, + 'availability_state': {'key': 'properties.availabilityState', 'type': 'str'}, + 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, + 'last_modified_time_utc': {'key': 'properties.lastModifiedTimeUtc', 'type': 'iso-8601'}, + 'site_config': {'key': 'properties.siteConfig', 'type': 'SiteConfig'}, + 'traffic_manager_host_names': {'key': 'properties.trafficManagerHostNames', 'type': '[str]'}, + 'scm_site_also_stopped': {'key': 'properties.scmSiteAlsoStopped', 'type': 'bool'}, + 'target_swap_slot': {'key': 'properties.targetSwapSlot', 'type': 'str'}, + 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, + 'client_affinity_enabled': {'key': 'properties.clientAffinityEnabled', 'type': 'bool'}, + 'client_cert_enabled': {'key': 'properties.clientCertEnabled', 'type': 'bool'}, + 'client_cert_mode': {'key': 'properties.clientCertMode', 'type': 'str'}, + 'client_cert_exclusion_paths': {'key': 'properties.clientCertExclusionPaths', 'type': 'str'}, + 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, + 'custom_domain_verification_id': {'key': 'properties.customDomainVerificationId', 'type': 'str'}, + 'outbound_ip_addresses': {'key': 'properties.outboundIpAddresses', 'type': 'str'}, + 'possible_outbound_ip_addresses': {'key': 'properties.possibleOutboundIpAddresses', 'type': 'str'}, + 'container_size': {'key': 'properties.containerSize', 'type': 'int'}, + 'daily_memory_time_quota': {'key': 'properties.dailyMemoryTimeQuota', 'type': 'int'}, + 'suspended_till': {'key': 'properties.suspendedTill', 'type': 'iso-8601'}, + 'max_number_of_workers': {'key': 'properties.maxNumberOfWorkers', 'type': 'int'}, + 'cloning_info': {'key': 'properties.cloningInfo', 'type': 'CloningInfo'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'is_default_container': {'key': 'properties.isDefaultContainer', 'type': 'bool'}, + 'default_host_name': {'key': 'properties.defaultHostName', 'type': 'str'}, + 'slot_swap_status': {'key': 'properties.slotSwapStatus', 'type': 'SlotSwapStatus'}, + 'key_vault_reference_identity': {'key': 'properties.keyVaultReferenceIdentity', 'type': 'str'}, + 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, + 'redundancy_mode': {'key': 'properties.redundancyMode', 'type': 'str'}, + 'in_progress_operation_id': {'key': 'properties.inProgressOperationId', 'type': 'str'}, + 'storage_account_required': {'key': 'properties.storageAccountRequired', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + identity: Optional["ManagedServiceIdentity"] = None, + enabled: Optional[bool] = None, + host_name_ssl_states: Optional[List["HostNameSslState"]] = None, + server_farm_id: Optional[str] = None, + reserved: Optional[bool] = False, + is_xenon: Optional[bool] = False, + hyper_v: Optional[bool] = False, + site_config: Optional["SiteConfig"] = None, + scm_site_also_stopped: Optional[bool] = False, + hosting_environment_profile: Optional["HostingEnvironmentProfile"] = None, + client_affinity_enabled: Optional[bool] = None, + client_cert_enabled: Optional[bool] = None, + client_cert_mode: Optional[Union[str, "ClientCertMode"]] = None, + client_cert_exclusion_paths: Optional[str] = None, + host_names_disabled: Optional[bool] = None, + custom_domain_verification_id: Optional[str] = None, + container_size: Optional[int] = None, + daily_memory_time_quota: Optional[int] = None, + cloning_info: Optional["CloningInfo"] = None, + key_vault_reference_identity: Optional[str] = None, + https_only: Optional[bool] = None, + redundancy_mode: Optional[Union[str, "RedundancyMode"]] = None, + storage_account_required: Optional[bool] = None, + **kwargs + ): + super(SitePatchResource, self).__init__(kind=kind, **kwargs) + self.identity = identity + self.state = None + self.host_names = None + self.repository_site_name = None + self.usage_state = None + self.enabled = enabled + self.enabled_host_names = None + self.availability_state = None + self.host_name_ssl_states = host_name_ssl_states + self.server_farm_id = server_farm_id + self.reserved = reserved + self.is_xenon = is_xenon + self.hyper_v = hyper_v + self.last_modified_time_utc = None + self.site_config = site_config + self.traffic_manager_host_names = None + self.scm_site_also_stopped = scm_site_also_stopped + self.target_swap_slot = None + self.hosting_environment_profile = hosting_environment_profile + self.client_affinity_enabled = client_affinity_enabled + self.client_cert_enabled = client_cert_enabled + self.client_cert_mode = client_cert_mode + self.client_cert_exclusion_paths = client_cert_exclusion_paths + self.host_names_disabled = host_names_disabled + self.custom_domain_verification_id = custom_domain_verification_id + self.outbound_ip_addresses = None + self.possible_outbound_ip_addresses = None + self.container_size = container_size + self.daily_memory_time_quota = daily_memory_time_quota + self.suspended_till = None + self.max_number_of_workers = None + self.cloning_info = cloning_info + self.resource_group = None + self.is_default_container = None + self.default_host_name = None + self.slot_swap_status = None + self.key_vault_reference_identity = key_vault_reference_identity + self.https_only = https_only + self.redundancy_mode = redundancy_mode + self.in_progress_operation_id = None + self.storage_account_required = storage_account_required + + +class SitePhpErrorLogFlag(ProxyOnlyResource): + """Used for getting PHP error logging flag. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param local_log_errors: Local log_errors setting. + :type local_log_errors: str + :param master_log_errors: Master log_errors setting. + :type master_log_errors: str + :param local_log_errors_max_length: Local log_errors_max_len setting. + :type local_log_errors_max_length: str + :param master_log_errors_max_length: Master log_errors_max_len setting. + :type master_log_errors_max_length: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'local_log_errors': {'key': 'properties.localLogErrors', 'type': 'str'}, + 'master_log_errors': {'key': 'properties.masterLogErrors', 'type': 'str'}, + 'local_log_errors_max_length': {'key': 'properties.localLogErrorsMaxLength', 'type': 'str'}, + 'master_log_errors_max_length': {'key': 'properties.masterLogErrorsMaxLength', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + local_log_errors: Optional[str] = None, + master_log_errors: Optional[str] = None, + local_log_errors_max_length: Optional[str] = None, + master_log_errors_max_length: Optional[str] = None, + **kwargs + ): + super(SitePhpErrorLogFlag, self).__init__(kind=kind, **kwargs) + self.local_log_errors = local_log_errors + self.master_log_errors = master_log_errors + self.local_log_errors_max_length = local_log_errors_max_length + self.master_log_errors_max_length = master_log_errors_max_length + + +class SiteSeal(msrest.serialization.Model): + """Site seal. + + All required parameters must be populated in order to send to Azure. + + :param html: Required. HTML snippet. + :type html: str + """ + + _validation = { + 'html': {'required': True}, + } + + _attribute_map = { + 'html': {'key': 'html', 'type': 'str'}, + } + + def __init__( + self, + *, + html: str, + **kwargs + ): + super(SiteSeal, self).__init__(**kwargs) + self.html = html + + +class SiteSealRequest(msrest.serialization.Model): + """Site seal request. + + :param light_theme: If :code:`true` use the light color theme for site seal; + otherwise, use the default color theme. + :type light_theme: bool + :param locale: Locale of site seal. + :type locale: str + """ + + _attribute_map = { + 'light_theme': {'key': 'lightTheme', 'type': 'bool'}, + 'locale': {'key': 'locale', 'type': 'str'}, + } + + def __init__( + self, + *, + light_theme: Optional[bool] = None, + locale: Optional[str] = None, + **kwargs + ): + super(SiteSealRequest, self).__init__(**kwargs) + self.light_theme = light_theme + self.locale = locale + + +class SiteSourceControl(ProxyOnlyResource): + """Source control configuration for an app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param repo_url: Repository or source control URL. + :type repo_url: str + :param branch: Name of branch to use for deployment. + :type branch: str + :param is_manual_integration: :code:`true` to limit to manual integration; + :code:`false` to enable continuous integration (which configures webhooks into + online repos like GitHub). + :type is_manual_integration: bool + :param is_git_hub_action: :code:`true` if this is deployed via GitHub action. + :type is_git_hub_action: bool + :param deployment_rollback_enabled: :code:`true` to enable deployment rollback; + otherwise, :code:`false`. + :type deployment_rollback_enabled: bool + :param is_mercurial: :code:`true` for a Mercurial repository; + :code:`false` for a Git repository. + :type is_mercurial: bool + :param git_hub_action_configuration: If GitHub Action is selected, than the associated + configuration. + :type git_hub_action_configuration: + ~azure.mgmt.web.v2020_12_01.models.GitHubActionConfiguration + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, + 'is_git_hub_action': {'key': 'properties.isGitHubAction', 'type': 'bool'}, + 'deployment_rollback_enabled': {'key': 'properties.deploymentRollbackEnabled', 'type': 'bool'}, + 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, + 'git_hub_action_configuration': {'key': 'properties.gitHubActionConfiguration', 'type': 'GitHubActionConfiguration'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + repo_url: Optional[str] = None, + branch: Optional[str] = None, + is_manual_integration: Optional[bool] = None, + is_git_hub_action: Optional[bool] = None, + deployment_rollback_enabled: Optional[bool] = None, + is_mercurial: Optional[bool] = None, + git_hub_action_configuration: Optional["GitHubActionConfiguration"] = None, + **kwargs + ): + super(SiteSourceControl, self).__init__(kind=kind, **kwargs) + self.repo_url = repo_url + self.branch = branch + self.is_manual_integration = is_manual_integration + self.is_git_hub_action = is_git_hub_action + self.deployment_rollback_enabled = deployment_rollback_enabled + self.is_mercurial = is_mercurial + self.git_hub_action_configuration = git_hub_action_configuration + + +class SkuCapacity(msrest.serialization.Model): + """Description of the App Service plan scale options. + + :param minimum: Minimum number of workers for this App Service plan SKU. + :type minimum: int + :param maximum: Maximum number of workers for this App Service plan SKU. + :type maximum: int + :param elastic_maximum: Maximum number of Elastic workers for this App Service plan SKU. + :type elastic_maximum: int + :param default: Default number of workers for this App Service plan SKU. + :type default: int + :param scale_type: Available scale configurations for an App Service plan. + :type scale_type: str + """ + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'elastic_maximum': {'key': 'elasticMaximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + *, + minimum: Optional[int] = None, + maximum: Optional[int] = None, + elastic_maximum: Optional[int] = None, + default: Optional[int] = None, + scale_type: Optional[str] = None, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.elastic_maximum = elastic_maximum + self.default = default + self.scale_type = scale_type + + +class SkuDescription(msrest.serialization.Model): + """Description of a SKU for a scalable resource. + + :param name: Name of the resource SKU. + :type name: str + :param tier: Service tier of the resource SKU. + :type tier: str + :param size: Size specifier of the resource SKU. + :type size: str + :param family: Family code of the resource SKU. + :type family: str + :param capacity: Current number of instances assigned to the resource. + :type capacity: int + :param sku_capacity: Min, max, and default scale values of the SKU. + :type sku_capacity: ~azure.mgmt.web.v2020_12_01.models.SkuCapacity + :param locations: Locations of the SKU. + :type locations: list[str] + :param capabilities: Capabilities of the SKU, e.g., is traffic manager enabled?. + :type capabilities: list[~azure.mgmt.web.v2020_12_01.models.Capability] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'sku_capacity': {'key': 'skuCapacity', 'type': 'SkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + tier: Optional[str] = None, + size: Optional[str] = None, + family: Optional[str] = None, + capacity: Optional[int] = None, + sku_capacity: Optional["SkuCapacity"] = None, + locations: Optional[List[str]] = None, + capabilities: Optional[List["Capability"]] = None, + **kwargs + ): + super(SkuDescription, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + self.sku_capacity = sku_capacity + self.locations = locations + self.capabilities = capabilities + + +class SkuInfo(msrest.serialization.Model): + """SKU discovery information. + + :param resource_type: Resource type that this SKU applies to. + :type resource_type: str + :param sku: Name and tier of the SKU. + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param capacity: Min, max, and default scale values of the SKU. + :type capacity: ~azure.mgmt.web.v2020_12_01.models.SkuCapacity + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + } + + def __init__( + self, + *, + resource_type: Optional[str] = None, + sku: Optional["SkuDescription"] = None, + capacity: Optional["SkuCapacity"] = None, + **kwargs + ): + super(SkuInfo, self).__init__(**kwargs) + self.resource_type = resource_type + self.sku = sku + self.capacity = capacity + + +class SkuInfoCollection(msrest.serialization.Model): + """Collection of SKU information. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SkuInfo] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SkuInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["SkuInfo"], + **kwargs + ): + super(SkuInfoCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class SkuInfos(msrest.serialization.Model): + """Collection of SKU information. + + :param resource_type: Resource type that this SKU applies to. + :type resource_type: str + :param skus: List of SKUs the subscription is able to use. + :type skus: list[~azure.mgmt.web.v2020_12_01.models.GlobalCsmSkuDescription] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'skus': {'key': 'skus', 'type': '[GlobalCsmSkuDescription]'}, + } + + def __init__( + self, + *, + resource_type: Optional[str] = None, + skus: Optional[List["GlobalCsmSkuDescription"]] = None, + **kwargs + ): + super(SkuInfos, self).__init__(**kwargs) + self.resource_type = resource_type + self.skus = skus + + +class SlotConfigNamesResource(ProxyOnlyResource): + """Slot Config names azure resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param connection_string_names: List of connection string names. + :type connection_string_names: list[str] + :param app_setting_names: List of application settings names. + :type app_setting_names: list[str] + :param azure_storage_config_names: List of external Azure storage account identifiers. + :type azure_storage_config_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string_names': {'key': 'properties.connectionStringNames', 'type': '[str]'}, + 'app_setting_names': {'key': 'properties.appSettingNames', 'type': '[str]'}, + 'azure_storage_config_names': {'key': 'properties.azureStorageConfigNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + connection_string_names: Optional[List[str]] = None, + app_setting_names: Optional[List[str]] = None, + azure_storage_config_names: Optional[List[str]] = None, + **kwargs + ): + super(SlotConfigNamesResource, self).__init__(kind=kind, **kwargs) + self.connection_string_names = connection_string_names + self.app_setting_names = app_setting_names + self.azure_storage_config_names = azure_storage_config_names + + +class SlotDifference(ProxyOnlyResource): + """A setting difference between two deployment slots of an app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar level: Level of the difference: Information, Warning or Error. + :vartype level: str + :ivar setting_type: The type of the setting: General, AppSetting or ConnectionString. + :vartype setting_type: str + :ivar diff_rule: Rule that describes how to process the setting difference during a slot swap. + :vartype diff_rule: str + :ivar setting_name: Name of the setting. + :vartype setting_name: str + :ivar value_in_current_slot: Value of the setting in the current slot. + :vartype value_in_current_slot: str + :ivar value_in_target_slot: Value of the setting in the target slot. + :vartype value_in_target_slot: str + :ivar description: Description of the setting difference. + :vartype description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'level': {'readonly': True}, + 'setting_type': {'readonly': True}, + 'diff_rule': {'readonly': True}, + 'setting_name': {'readonly': True}, + 'value_in_current_slot': {'readonly': True}, + 'value_in_target_slot': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'level': {'key': 'properties.level', 'type': 'str'}, + 'setting_type': {'key': 'properties.settingType', 'type': 'str'}, + 'diff_rule': {'key': 'properties.diffRule', 'type': 'str'}, + 'setting_name': {'key': 'properties.settingName', 'type': 'str'}, + 'value_in_current_slot': {'key': 'properties.valueInCurrentSlot', 'type': 'str'}, + 'value_in_target_slot': {'key': 'properties.valueInTargetSlot', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(SlotDifference, self).__init__(kind=kind, **kwargs) + self.level = None + self.setting_type = None + self.diff_rule = None + self.setting_name = None + self.value_in_current_slot = None + self.value_in_target_slot = None + self.description = None + + +class SlotDifferenceCollection(msrest.serialization.Model): + """Collection of slot differences. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SlotDifference] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SlotDifference]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["SlotDifference"], + **kwargs + ): + super(SlotDifferenceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class SlotSwapStatus(msrest.serialization.Model): + """The status of the last successful slot swap operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar timestamp_utc: The time the last successful slot swap completed. + :vartype timestamp_utc: ~datetime.datetime + :ivar source_slot_name: The source slot of the last swap operation. + :vartype source_slot_name: str + :ivar destination_slot_name: The destination slot of the last swap operation. + :vartype destination_slot_name: str + """ + + _validation = { + 'timestamp_utc': {'readonly': True}, + 'source_slot_name': {'readonly': True}, + 'destination_slot_name': {'readonly': True}, + } + + _attribute_map = { + 'timestamp_utc': {'key': 'timestampUtc', 'type': 'iso-8601'}, + 'source_slot_name': {'key': 'sourceSlotName', 'type': 'str'}, + 'destination_slot_name': {'key': 'destinationSlotName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SlotSwapStatus, self).__init__(**kwargs) + self.timestamp_utc = None + self.source_slot_name = None + self.destination_slot_name = None + + +class SlowRequestsBasedTrigger(msrest.serialization.Model): + """Trigger based on request execution time. + + :param time_taken: Time taken. + :type time_taken: str + :param path: Request Path. + :type path: str + :param count: Request Count. + :type count: int + :param time_interval: Time interval. + :type time_interval: str + """ + + _attribute_map = { + 'time_taken': {'key': 'timeTaken', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__( + self, + *, + time_taken: Optional[str] = None, + path: Optional[str] = None, + count: Optional[int] = None, + time_interval: Optional[str] = None, + **kwargs + ): + super(SlowRequestsBasedTrigger, self).__init__(**kwargs) + self.time_taken = time_taken + self.path = path + self.count = count + self.time_interval = time_interval + + +class Snapshot(ProxyOnlyResource): + """A snapshot of an app. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar time: The time the snapshot was taken. + :vartype time: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time': {'key': 'properties.time', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(Snapshot, self).__init__(kind=kind, **kwargs) + self.time = None + + +class SnapshotCollection(msrest.serialization.Model): + """Collection of snapshots which can be used to revert an app to a previous time. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Snapshot] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Snapshot]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Snapshot"], + **kwargs + ): + super(SnapshotCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class SnapshotRecoverySource(msrest.serialization.Model): + """Specifies the web app that snapshot contents will be retrieved from. + + :param location: Geographical location of the source web app, e.g. SouthEastAsia, + SouthCentralUS. + :type location: str + :param id: ARM resource ID of the source app. + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + for production slots and + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + for other slots. + :type id: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + id: Optional[str] = None, + **kwargs + ): + super(SnapshotRecoverySource, self).__init__(**kwargs) + self.location = location + self.id = id + + +class SnapshotRestoreRequest(ProxyOnlyResource): + """Details about app recovery operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param snapshot_time: Point in time in which the app restore should be done, formatted as a + DateTime string. + :type snapshot_time: str + :param recovery_source: Optional. Specifies the web app that snapshot contents will be + retrieved from. + If empty, the targeted web app will be used as the source. + :type recovery_source: ~azure.mgmt.web.v2020_12_01.models.SnapshotRecoverySource + :param overwrite: If :code:`true` the restore operation can overwrite source app; + otherwise, :code:`false`. + :type overwrite: bool + :param recover_configuration: If true, site configuration, in addition to content, will be + reverted. + :type recover_configuration: bool + :param ignore_conflicting_host_names: If true, custom hostname conflicts will be ignored when + recovering to a target web app. + This setting is only necessary when RecoverConfiguration is enabled. + :type ignore_conflicting_host_names: bool + :param use_dr_secondary: If true, the snapshot is retrieved from DRSecondary endpoint. + :type use_dr_secondary: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, + 'recovery_source': {'key': 'properties.recoverySource', 'type': 'SnapshotRecoverySource'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + 'use_dr_secondary': {'key': 'properties.useDRSecondary', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + snapshot_time: Optional[str] = None, + recovery_source: Optional["SnapshotRecoverySource"] = None, + overwrite: Optional[bool] = None, + recover_configuration: Optional[bool] = None, + ignore_conflicting_host_names: Optional[bool] = None, + use_dr_secondary: Optional[bool] = None, + **kwargs + ): + super(SnapshotRestoreRequest, self).__init__(kind=kind, **kwargs) + self.snapshot_time = snapshot_time + self.recovery_source = recovery_source + self.overwrite = overwrite + self.recover_configuration = recover_configuration + self.ignore_conflicting_host_names = ignore_conflicting_host_names + self.use_dr_secondary = use_dr_secondary + + +class Solution(msrest.serialization.Model): + """Class Representing Solution for problems detected. + + :param id: Solution Id. + :type id: float + :param display_name: Display Name of the solution. + :type display_name: str + :param order: Order of the solution. + :type order: float + :param description: Description of the solution. + :type description: str + :param type: Type of Solution. Possible values include: "QuickSolution", "DeepInvestigation", + "BestPractices". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.v2020_12_01.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: list[list[~azure.mgmt.web.v2020_12_01.models.NameValuePair]] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'float'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, + } + + def __init__( + self, + *, + id: Optional[float] = None, + display_name: Optional[str] = None, + order: Optional[float] = None, + description: Optional[str] = None, + type: Optional[Union[str, "SolutionType"]] = None, + data: Optional[List[List["NameValuePair"]]] = None, + metadata: Optional[List[List["NameValuePair"]]] = None, + **kwargs + ): + super(Solution, self).__init__(**kwargs) + self.id = id + self.display_name = display_name + self.order = order + self.description = description + self.type = type + self.data = data + self.metadata = metadata + + +class SourceControl(ProxyOnlyResource): + """The source control OAuth token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param token: OAuth access token. + :type token: str + :param token_secret: OAuth access token secret. + :type token_secret: str + :param refresh_token: OAuth refresh token. + :type refresh_token: str + :param expiration_time: OAuth token expiration. + :type expiration_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'token': {'key': 'properties.token', 'type': 'str'}, + 'token_secret': {'key': 'properties.tokenSecret', 'type': 'str'}, + 'refresh_token': {'key': 'properties.refreshToken', 'type': 'str'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + token: Optional[str] = None, + token_secret: Optional[str] = None, + refresh_token: Optional[str] = None, + expiration_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(SourceControl, self).__init__(kind=kind, **kwargs) + self.token = token + self.token_secret = token_secret + self.refresh_token = refresh_token + self.expiration_time = expiration_time + + +class SourceControlCollection(msrest.serialization.Model): + """Collection of source controls. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.SourceControl] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SourceControl]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["SourceControl"], + **kwargs + ): + super(SourceControlCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class StackMajorVersion(msrest.serialization.Model): + """Application stack major version. + + :param display_version: Application stack major version (display only). + :type display_version: str + :param runtime_version: Application stack major version (runtime only). + :type runtime_version: str + :param is_default: :code:`true` if this is the default major version; otherwise, + :code:`false`. + :type is_default: bool + :param minor_versions: Minor versions associated with the major version. + :type minor_versions: list[~azure.mgmt.web.v2020_12_01.models.StackMinorVersion] + :param application_insights: :code:`true` if this supports Application Insights; + otherwise, :code:`false`. + :type application_insights: bool + :param app_settings_dictionary: :code:` + + ` + Example: All the function apps need AppSetting: "FUNCTIONS_WORKER_RUNTIME" to be set stack + name. + :type app_settings_dictionary: dict[str, object] + :param site_config_properties_dictionary: :code:` + + ` + Example: All Linux Function Apps, need Use32BitWorkerProcess to be set to 0. + :type site_config_properties_dictionary: dict[str, object] + :param is_preview: :code:`true` if this stack is in Preview, otherwise + :code:`false`. + :type is_preview: bool + :param is_deprecated: :code:`true` if this stack has been deprecated, otherwise + :code:`false`. + :type is_deprecated: bool + :param is_hidden: :code:`true` if this stack should be hidden for new customers on + portal, otherwise :code:`false`. + :type is_hidden: bool + """ + + _attribute_map = { + 'display_version': {'key': 'displayVersion', 'type': 'str'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'minor_versions': {'key': 'minorVersions', 'type': '[StackMinorVersion]'}, + 'application_insights': {'key': 'applicationInsights', 'type': 'bool'}, + 'app_settings_dictionary': {'key': 'appSettingsDictionary', 'type': '{object}'}, + 'site_config_properties_dictionary': {'key': 'siteConfigPropertiesDictionary', 'type': '{object}'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + } + + def __init__( + self, + *, + display_version: Optional[str] = None, + runtime_version: Optional[str] = None, + is_default: Optional[bool] = None, + minor_versions: Optional[List["StackMinorVersion"]] = None, + application_insights: Optional[bool] = None, + app_settings_dictionary: Optional[Dict[str, object]] = None, + site_config_properties_dictionary: Optional[Dict[str, object]] = None, + is_preview: Optional[bool] = None, + is_deprecated: Optional[bool] = None, + is_hidden: Optional[bool] = None, + **kwargs + ): + super(StackMajorVersion, self).__init__(**kwargs) + self.display_version = display_version + self.runtime_version = runtime_version + self.is_default = is_default + self.minor_versions = minor_versions + self.application_insights = application_insights + self.app_settings_dictionary = app_settings_dictionary + self.site_config_properties_dictionary = site_config_properties_dictionary + self.is_preview = is_preview + self.is_deprecated = is_deprecated + self.is_hidden = is_hidden + + +class StackMinorVersion(msrest.serialization.Model): + """Application stack minor version. + + :param display_version: Application stack minor version (display only). + :type display_version: str + :param runtime_version: Application stack minor version (runtime only). + :type runtime_version: str + :param is_default: :code:`true` if this is the default minor version; otherwise, + :code:`false`. + :type is_default: bool + :param is_remote_debugging_enabled: :code:`true` if this supports Remote + Debugging, otherwise :code:`false`. + :type is_remote_debugging_enabled: bool + """ + + _attribute_map = { + 'display_version': {'key': 'displayVersion', 'type': 'str'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_remote_debugging_enabled': {'key': 'isRemoteDebuggingEnabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + display_version: Optional[str] = None, + runtime_version: Optional[str] = None, + is_default: Optional[bool] = None, + is_remote_debugging_enabled: Optional[bool] = None, + **kwargs + ): + super(StackMinorVersion, self).__init__(**kwargs) + self.display_version = display_version + self.runtime_version = runtime_version + self.is_default = is_default + self.is_remote_debugging_enabled = is_remote_debugging_enabled + + +class StampCapacity(msrest.serialization.Model): + """Stamp capacity information. + + :param name: Name of the stamp. + :type name: str + :param available_capacity: Available capacity (# of machines, bytes of storage etc...). + :type available_capacity: long + :param total_capacity: Total capacity (# of machines, bytes of storage etc...). + :type total_capacity: long + :param unit: Name of the unit. + :type unit: str + :param compute_mode: Shared/dedicated workers. Possible values include: "Shared", "Dedicated", + "Dynamic". + :type compute_mode: str or ~azure.mgmt.web.v2020_12_01.models.ComputeModeOptions + :param worker_size: Size of the machines. Possible values include: "Small", "Medium", "Large", + "D1", "D2", "D3", "SmallV3", "MediumV3", "LargeV3", "NestedSmall", "NestedSmallLinux", + "Default". + :type worker_size: str or ~azure.mgmt.web.v2020_12_01.models.WorkerSizeOptions + :param worker_size_id: Size ID of machines: + 0 - Small + 1 - Medium + 2 - Large. + :type worker_size_id: int + :param exclude_from_capacity_allocation: If :code:`true`, it includes basic apps. + Basic apps are not used for capacity allocation. + :type exclude_from_capacity_allocation: bool + :param is_applicable_for_all_compute_modes: :code:`true` if capacity is applicable + for all apps; otherwise, :code:`false`. + :type is_applicable_for_all_compute_modes: bool + :param site_mode: Shared or Dedicated. + :type site_mode: str + :param is_linux: Is this a linux stamp capacity. + :type is_linux: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'available_capacity': {'key': 'availableCapacity', 'type': 'long'}, + 'total_capacity': {'key': 'totalCapacity', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'compute_mode': {'key': 'computeMode', 'type': 'str'}, + 'worker_size': {'key': 'workerSize', 'type': 'str'}, + 'worker_size_id': {'key': 'workerSizeId', 'type': 'int'}, + 'exclude_from_capacity_allocation': {'key': 'excludeFromCapacityAllocation', 'type': 'bool'}, + 'is_applicable_for_all_compute_modes': {'key': 'isApplicableForAllComputeModes', 'type': 'bool'}, + 'site_mode': {'key': 'siteMode', 'type': 'str'}, + 'is_linux': {'key': 'isLinux', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + available_capacity: Optional[int] = None, + total_capacity: Optional[int] = None, + unit: Optional[str] = None, + compute_mode: Optional[Union[str, "ComputeModeOptions"]] = None, + worker_size: Optional[Union[str, "WorkerSizeOptions"]] = None, + worker_size_id: Optional[int] = None, + exclude_from_capacity_allocation: Optional[bool] = None, + is_applicable_for_all_compute_modes: Optional[bool] = None, + site_mode: Optional[str] = None, + is_linux: Optional[bool] = None, + **kwargs + ): + super(StampCapacity, self).__init__(**kwargs) + self.name = name + self.available_capacity = available_capacity + self.total_capacity = total_capacity + self.unit = unit + self.compute_mode = compute_mode + self.worker_size = worker_size + self.worker_size_id = worker_size_id + self.exclude_from_capacity_allocation = exclude_from_capacity_allocation + self.is_applicable_for_all_compute_modes = is_applicable_for_all_compute_modes + self.site_mode = site_mode + self.is_linux = is_linux + + +class StampCapacityCollection(msrest.serialization.Model): + """Collection of stamp capacities. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StampCapacity] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StampCapacity]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["StampCapacity"], + **kwargs + ): + super(StampCapacityCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class StaticSiteARMResource(Resource): + """Static Site ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :param location: Required. Resource Location. + :type location: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: Description of a SKU for a scalable resource. + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param identity: Managed service identity. + :type identity: ~azure.mgmt.web.v2020_12_01.models.ManagedServiceIdentity + :ivar default_hostname: The default autogenerated hostname for the static site. + :vartype default_hostname: str + :param repository_url: URL for the repository of the static site. + :type repository_url: str + :param branch: The target branch in the repository. + :type branch: str + :ivar provider: The provider that submitted the last deployment to the primary environment of + the static site. + :vartype provider: str + :ivar custom_domains: The custom domains associated with this static site. + :vartype custom_domains: list[str] + :param repository_token: A user's github repository token. This is used to setup the Github + Actions workflow file and API secrets. + :type repository_token: str + :param build_properties: Build properties to configure on the repository. + :type build_properties: ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildProperties + :param template_properties: Template options for generating a new repository. + :type template_properties: ~azure.mgmt.web.v2020_12_01.models.StaticSiteTemplateOptions + :ivar content_distribution_endpoint: The content distribution endpoint for the static site. + :vartype content_distribution_endpoint: str + :ivar key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :vartype key_vault_reference_identity: str + :ivar user_provided_function_apps: User provided function apps registered with the static site. + :vartype user_provided_function_apps: + list[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionApp] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'provider': {'readonly': True}, + 'custom_domains': {'readonly': True}, + 'content_distribution_endpoint': {'readonly': True}, + 'key_vault_reference_identity': {'readonly': True}, + 'user_provided_function_apps': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + 'template_properties': {'key': 'properties.templateProperties', 'type': 'StaticSiteTemplateOptions'}, + 'content_distribution_endpoint': {'key': 'properties.contentDistributionEndpoint', 'type': 'str'}, + 'key_vault_reference_identity': {'key': 'properties.keyVaultReferenceIdentity', 'type': 'str'}, + 'user_provided_function_apps': {'key': 'properties.userProvidedFunctionApps', 'type': '[StaticSiteUserProvidedFunctionApp]'}, + } + + def __init__( + self, + *, + location: str, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["SkuDescription"] = None, + identity: Optional["ManagedServiceIdentity"] = None, + repository_url: Optional[str] = None, + branch: Optional[str] = None, + repository_token: Optional[str] = None, + build_properties: Optional["StaticSiteBuildProperties"] = None, + template_properties: Optional["StaticSiteTemplateOptions"] = None, + **kwargs + ): + super(StaticSiteARMResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) + self.sku = sku + self.identity = identity + self.default_hostname = None + self.repository_url = repository_url + self.branch = branch + self.provider = None + self.custom_domains = None + self.repository_token = repository_token + self.build_properties = build_properties + self.template_properties = template_properties + self.content_distribution_endpoint = None + self.key_vault_reference_identity = None + self.user_provided_function_apps = None + + +class StaticSiteBuildARMResource(ProxyOnlyResource): + """Static Site Build ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar build_id: An identifier for the static site build. + :vartype build_id: str + :ivar source_branch: The source branch. + :vartype source_branch: str + :ivar pull_request_title: The title of a pull request that a static site build is related to. + :vartype pull_request_title: str + :ivar hostname: The hostname for a static site build. + :vartype hostname: str + :ivar created_time_utc: When this build was created. + :vartype created_time_utc: ~datetime.datetime + :ivar last_updated_on: When this build was updated. + :vartype last_updated_on: ~datetime.datetime + :ivar status: The status of the static site build. Possible values include: + "WaitingForDeployment", "Uploading", "Deploying", "Ready", "Failed", "Deleting", "Detached". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.BuildStatus + :ivar user_provided_function_apps: User provided function apps registered with the static site + build. + :vartype user_provided_function_apps: + list[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionApp] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'build_id': {'readonly': True}, + 'source_branch': {'readonly': True}, + 'pull_request_title': {'readonly': True}, + 'hostname': {'readonly': True}, + 'created_time_utc': {'readonly': True}, + 'last_updated_on': {'readonly': True}, + 'status': {'readonly': True}, + 'user_provided_function_apps': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'build_id': {'key': 'properties.buildId', 'type': 'str'}, + 'source_branch': {'key': 'properties.sourceBranch', 'type': 'str'}, + 'pull_request_title': {'key': 'properties.pullRequestTitle', 'type': 'str'}, + 'hostname': {'key': 'properties.hostname', 'type': 'str'}, + 'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'properties.lastUpdatedOn', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'user_provided_function_apps': {'key': 'properties.userProvidedFunctionApps', 'type': '[StaticSiteUserProvidedFunctionApp]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(StaticSiteBuildARMResource, self).__init__(kind=kind, **kwargs) + self.build_id = None + self.source_branch = None + self.pull_request_title = None + self.hostname = None + self.created_time_utc = None + self.last_updated_on = None + self.status = None + self.user_provided_function_apps = None + + +class StaticSiteBuildCollection(msrest.serialization.Model): + """Collection of static site builds. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteBuildARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["StaticSiteBuildARMResource"], + **kwargs + ): + super(StaticSiteBuildCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class StaticSiteBuildProperties(msrest.serialization.Model): + """Build properties for the static site. + + :param app_location: The path to the app code within the repository. + :type app_location: str + :param api_location: The path to the api code within the repository. + :type api_location: str + :param app_artifact_location: Deprecated: The path of the app artifacts after building + (deprecated in favor of OutputLocation). + :type app_artifact_location: str + :param output_location: The output path of the app after building. + :type output_location: str + :param app_build_command: A custom command to run during deployment of the static content + application. + :type app_build_command: str + :param api_build_command: A custom command to run during deployment of the Azure Functions API + application. + :type api_build_command: str + :param skip_github_action_workflow_generation: Skip Github Action workflow generation. + :type skip_github_action_workflow_generation: bool + :param github_action_secret_name_override: Github Action secret name override. + :type github_action_secret_name_override: str + """ + + _attribute_map = { + 'app_location': {'key': 'appLocation', 'type': 'str'}, + 'api_location': {'key': 'apiLocation', 'type': 'str'}, + 'app_artifact_location': {'key': 'appArtifactLocation', 'type': 'str'}, + 'output_location': {'key': 'outputLocation', 'type': 'str'}, + 'app_build_command': {'key': 'appBuildCommand', 'type': 'str'}, + 'api_build_command': {'key': 'apiBuildCommand', 'type': 'str'}, + 'skip_github_action_workflow_generation': {'key': 'skipGithubActionWorkflowGeneration', 'type': 'bool'}, + 'github_action_secret_name_override': {'key': 'githubActionSecretNameOverride', 'type': 'str'}, + } + + def __init__( + self, + *, + app_location: Optional[str] = None, + api_location: Optional[str] = None, + app_artifact_location: Optional[str] = None, + output_location: Optional[str] = None, + app_build_command: Optional[str] = None, + api_build_command: Optional[str] = None, + skip_github_action_workflow_generation: Optional[bool] = None, + github_action_secret_name_override: Optional[str] = None, + **kwargs + ): + super(StaticSiteBuildProperties, self).__init__(**kwargs) + self.app_location = app_location + self.api_location = api_location + self.app_artifact_location = app_artifact_location + self.output_location = output_location + self.app_build_command = app_build_command + self.api_build_command = api_build_command + self.skip_github_action_workflow_generation = skip_github_action_workflow_generation + self.github_action_secret_name_override = github_action_secret_name_override + + +class StaticSiteCollection(msrest.serialization.Model): + """Collection of static sites. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["StaticSiteARMResource"], + **kwargs + ): + super(StaticSiteCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class StaticSiteCustomDomainOverviewARMResource(ProxyOnlyResource): + """Static Site Custom Domain Overview ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar domain_name: The domain name for the static site custom domain. + :vartype domain_name: str + :ivar created_on: The date and time on which the custom domain was created for the static site. + :vartype created_on: ~datetime.datetime + :ivar status: The status of the custom domain. Possible values include: + "RetrievingValidationToken", "Validating", "Adding", "Ready", "Failed", "Deleting". + :vartype status: str or ~azure.mgmt.web.v2020_12_01.models.CustomDomainStatus + :ivar validation_token: The TXT record validation token. + :vartype validation_token: str + :ivar error_message: + :vartype error_message: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'domain_name': {'readonly': True}, + 'created_on': {'readonly': True}, + 'status': {'readonly': True}, + 'validation_token': {'readonly': True}, + 'error_message': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'validation_token': {'key': 'properties.validationToken', 'type': 'str'}, + 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(StaticSiteCustomDomainOverviewARMResource, self).__init__(kind=kind, **kwargs) + self.domain_name = None + self.created_on = None + self.status = None + self.validation_token = None + self.error_message = None + + +class StaticSiteCustomDomainOverviewCollection(msrest.serialization.Model): + """Collection of static site custom domains. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteCustomDomainOverviewARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["StaticSiteCustomDomainOverviewARMResource"], + **kwargs + ): + super(StaticSiteCustomDomainOverviewCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class StaticSiteCustomDomainRequestPropertiesARMResource(ProxyOnlyResource): + """Static Site Custom Domain Request Properties ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param validation_method: Validation method for adding a custom domain. + :type validation_method: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'validation_method': {'key': 'properties.validationMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + validation_method: Optional[str] = "cname-delegation", + **kwargs + ): + super(StaticSiteCustomDomainRequestPropertiesARMResource, self).__init__(kind=kind, **kwargs) + self.validation_method = validation_method + + +class StaticSiteFunctionOverviewARMResource(ProxyOnlyResource): + """Static Site Function Overview ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar function_name: The name for the function. + :vartype function_name: str + :ivar trigger_type: The trigger type of the function. Possible values include: "HttpTrigger", + "Unknown". + :vartype trigger_type: str or ~azure.mgmt.web.v2020_12_01.models.TriggerTypes + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'function_name': {'readonly': True}, + 'trigger_type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'function_name': {'key': 'properties.functionName', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(StaticSiteFunctionOverviewARMResource, self).__init__(kind=kind, **kwargs) + self.function_name = None + self.trigger_type = None + + +class StaticSiteFunctionOverviewCollection(msrest.serialization.Model): + """Collection of static site functions. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteFunctionOverviewARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["StaticSiteFunctionOverviewARMResource"], + **kwargs + ): + super(StaticSiteFunctionOverviewCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class StaticSitePatchResource(ProxyOnlyResource): + """ARM resource for a static site when patching. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar default_hostname: The default autogenerated hostname for the static site. + :vartype default_hostname: str + :param repository_url: URL for the repository of the static site. + :type repository_url: str + :param branch: The target branch in the repository. + :type branch: str + :ivar provider: The provider that submitted the last deployment to the primary environment of + the static site. + :vartype provider: str + :ivar custom_domains: The custom domains associated with this static site. + :vartype custom_domains: list[str] + :param repository_token: A user's github repository token. This is used to setup the Github + Actions workflow file and API secrets. + :type repository_token: str + :param build_properties: Build properties to configure on the repository. + :type build_properties: ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildProperties + :param template_properties: Template options for generating a new repository. + :type template_properties: ~azure.mgmt.web.v2020_12_01.models.StaticSiteTemplateOptions + :ivar content_distribution_endpoint: The content distribution endpoint for the static site. + :vartype content_distribution_endpoint: str + :ivar key_vault_reference_identity: Identity to use for Key Vault Reference authentication. + :vartype key_vault_reference_identity: str + :ivar user_provided_function_apps: User provided function apps registered with the static site. + :vartype user_provided_function_apps: + list[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionApp] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_hostname': {'readonly': True}, + 'provider': {'readonly': True}, + 'custom_domains': {'readonly': True}, + 'content_distribution_endpoint': {'readonly': True}, + 'key_vault_reference_identity': {'readonly': True}, + 'user_provided_function_apps': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_hostname': {'key': 'properties.defaultHostname', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'custom_domains': {'key': 'properties.customDomains', 'type': '[str]'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + 'template_properties': {'key': 'properties.templateProperties', 'type': 'StaticSiteTemplateOptions'}, + 'content_distribution_endpoint': {'key': 'properties.contentDistributionEndpoint', 'type': 'str'}, + 'key_vault_reference_identity': {'key': 'properties.keyVaultReferenceIdentity', 'type': 'str'}, + 'user_provided_function_apps': {'key': 'properties.userProvidedFunctionApps', 'type': '[StaticSiteUserProvidedFunctionApp]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + repository_url: Optional[str] = None, + branch: Optional[str] = None, + repository_token: Optional[str] = None, + build_properties: Optional["StaticSiteBuildProperties"] = None, + template_properties: Optional["StaticSiteTemplateOptions"] = None, + **kwargs + ): + super(StaticSitePatchResource, self).__init__(kind=kind, **kwargs) + self.default_hostname = None + self.repository_url = repository_url + self.branch = branch + self.provider = None + self.custom_domains = None + self.repository_token = repository_token + self.build_properties = build_properties + self.template_properties = template_properties + self.content_distribution_endpoint = None + self.key_vault_reference_identity = None + self.user_provided_function_apps = None + + +class StaticSiteResetPropertiesARMResource(ProxyOnlyResource): + """Static Site Reset Properties ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param repository_token: The token which proves admin privileges to the repository. + :type repository_token: str + :param should_update_repository: Determines whether the repository should be updated with the + new properties. + :type should_update_repository: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'repository_token': {'key': 'properties.repositoryToken', 'type': 'str'}, + 'should_update_repository': {'key': 'properties.shouldUpdateRepository', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + repository_token: Optional[str] = None, + should_update_repository: Optional[bool] = None, + **kwargs + ): + super(StaticSiteResetPropertiesARMResource, self).__init__(kind=kind, **kwargs) + self.repository_token = repository_token + self.should_update_repository = should_update_repository + + +class StaticSitesWorkflowPreview(ProxyOnlyResource): + """Preview for the Static Site Workflow to be generated. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar path: The path for the workflow file to be generated. + :vartype path: str + :ivar contents: The contents for the workflow file to be generated. + :vartype contents: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'path': {'readonly': True}, + 'contents': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(StaticSitesWorkflowPreview, self).__init__(kind=kind, **kwargs) + self.path = None + self.contents = None + + +class StaticSitesWorkflowPreviewRequest(ProxyOnlyResource): + """Request entity for previewing the Static Site workflow. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param repository_url: URL for the repository of the static site. + :type repository_url: str + :param branch: The target branch in the repository. + :type branch: str + :param build_properties: Build properties to configure on the repository. + :type build_properties: ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'build_properties': {'key': 'properties.buildProperties', 'type': 'StaticSiteBuildProperties'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + repository_url: Optional[str] = None, + branch: Optional[str] = None, + build_properties: Optional["StaticSiteBuildProperties"] = None, + **kwargs + ): + super(StaticSitesWorkflowPreviewRequest, self).__init__(kind=kind, **kwargs) + self.repository_url = repository_url + self.branch = branch + self.build_properties = build_properties + + +class StaticSiteTemplateOptions(msrest.serialization.Model): + """Template Options for the static site. + + :param template_repository_url: URL of the template repository. The newly generated repository + will be based on this one. + :type template_repository_url: str + :param owner: Owner of the newly generated repository. + :type owner: str + :param repository_name: Name of the newly generated repository. + :type repository_name: str + :param description: Description of the newly generated repository. + :type description: str + :param is_private: Whether or not the newly generated repository is a private repository. + Defaults to false (i.e. public). + :type is_private: bool + """ + + _attribute_map = { + 'template_repository_url': {'key': 'templateRepositoryUrl', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_private': {'key': 'isPrivate', 'type': 'bool'}, + } + + def __init__( + self, + *, + template_repository_url: Optional[str] = None, + owner: Optional[str] = None, + repository_name: Optional[str] = None, + description: Optional[str] = None, + is_private: Optional[bool] = None, + **kwargs + ): + super(StaticSiteTemplateOptions, self).__init__(**kwargs) + self.template_repository_url = template_repository_url + self.owner = owner + self.repository_name = repository_name + self.description = description + self.is_private = is_private + + +class StaticSiteUserARMResource(ProxyOnlyResource): + """Static Site User ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar provider: The identity provider for the static site user. + :vartype provider: str + :ivar user_id: The user id for the static site user. + :vartype user_id: str + :ivar display_name: The display name for the static site user. + :vartype display_name: str + :param roles: The roles for the static site user, in free-form string format. + :type roles: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provider': {'readonly': True}, + 'user_id': {'readonly': True}, + 'display_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + roles: Optional[str] = None, + **kwargs + ): + super(StaticSiteUserARMResource, self).__init__(kind=kind, **kwargs) + self.provider = None + self.user_id = None + self.display_name = None + self.roles = roles + + +class StaticSiteUserCollection(msrest.serialization.Model): + """Collection of static site custom users. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteUserARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["StaticSiteUserARMResource"], + **kwargs + ): + super(StaticSiteUserCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class StaticSiteUserInvitationRequestResource(ProxyOnlyResource): + """Static sites user roles invitation resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param domain: The domain name for the static site custom domain. + :type domain: str + :param provider: The identity provider for the static site user. + :type provider: str + :param user_details: The user id for the static site user. + :type user_details: str + :param roles: The roles for the static site user, in free-form string format. + :type roles: str + :param num_hours_to_expiration: The number of hours the sas token stays valid. + :type num_hours_to_expiration: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'domain': {'key': 'properties.domain', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'user_details': {'key': 'properties.userDetails', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': 'str'}, + 'num_hours_to_expiration': {'key': 'properties.numHoursToExpiration', 'type': 'int'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + domain: Optional[str] = None, + provider: Optional[str] = None, + user_details: Optional[str] = None, + roles: Optional[str] = None, + num_hours_to_expiration: Optional[int] = None, + **kwargs + ): + super(StaticSiteUserInvitationRequestResource, self).__init__(kind=kind, **kwargs) + self.domain = domain + self.provider = provider + self.user_details = user_details + self.roles = roles + self.num_hours_to_expiration = num_hours_to_expiration + + +class StaticSiteUserInvitationResponseResource(ProxyOnlyResource): + """Static sites user roles invitation link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar expires_on: The expiration time of the invitation. + :vartype expires_on: ~datetime.datetime + :ivar invitation_url: The url for the invitation link. + :vartype invitation_url: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'expires_on': {'readonly': True}, + 'invitation_url': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'expires_on': {'key': 'properties.expiresOn', 'type': 'iso-8601'}, + 'invitation_url': {'key': 'properties.invitationUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(StaticSiteUserInvitationResponseResource, self).__init__(kind=kind, **kwargs) + self.expires_on = None + self.invitation_url = None + + +class StaticSiteUserProvidedFunctionApp(ProxyOnlyResource): + """A static site user provided function. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param function_app_resource_id: The resource id of the function app registered with the static + site. + :type function_app_resource_id: str + :param function_app_region: The region of the function app registered with the static site. + :type function_app_region: str + :ivar created_on: The date and time on which the function app was registered with the static + site. + :vartype created_on: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_on': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'function_app_resource_id': {'key': 'properties.functionAppResourceId', 'type': 'str'}, + 'function_app_region': {'key': 'properties.functionAppRegion', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + function_app_resource_id: Optional[str] = None, + function_app_region: Optional[str] = None, + **kwargs + ): + super(StaticSiteUserProvidedFunctionApp, self).__init__(kind=kind, **kwargs) + self.function_app_resource_id = function_app_resource_id + self.function_app_region = function_app_region + self.created_on = None + + +class StaticSiteUserProvidedFunctionAppARMResource(ProxyOnlyResource): + """Static Site User Provided Function App ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param function_app_resource_id: The resource id of the function app registered with the static + site. + :type function_app_resource_id: str + :param function_app_region: The region of the function app registered with the static site. + :type function_app_region: str + :ivar created_on: The date and time on which the function app was registered with the static + site. + :vartype created_on: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_on': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'function_app_resource_id': {'key': 'properties.functionAppResourceId', 'type': 'str'}, + 'function_app_region': {'key': 'properties.functionAppRegion', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + function_app_resource_id: Optional[str] = None, + function_app_region: Optional[str] = None, + **kwargs + ): + super(StaticSiteUserProvidedFunctionAppARMResource, self).__init__(kind=kind, **kwargs) + self.function_app_resource_id = function_app_resource_id + self.function_app_region = function_app_region + self.created_on = None + + +class StaticSiteUserProvidedFunctionAppsCollection(msrest.serialization.Model): + """Collection of static site user provided function apps. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: + list[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StaticSiteUserProvidedFunctionAppARMResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["StaticSiteUserProvidedFunctionAppARMResource"], + **kwargs + ): + super(StaticSiteUserProvidedFunctionAppsCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class StaticSiteZipDeploymentARMResource(ProxyOnlyResource): + """Static site zip deployment ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param app_zip_url: URL for the zipped app content. + :type app_zip_url: str + :param api_zip_url: URL for the zipped api content. + :type api_zip_url: str + :param deployment_title: A title to label the deployment. + :type deployment_title: str + :param provider: The provider submitting this deployment. + :type provider: str + :param function_language: The language of the api content, if it exists. + :type function_language: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'app_zip_url': {'key': 'properties.appZipUrl', 'type': 'str'}, + 'api_zip_url': {'key': 'properties.apiZipUrl', 'type': 'str'}, + 'deployment_title': {'key': 'properties.deploymentTitle', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'function_language': {'key': 'properties.functionLanguage', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + app_zip_url: Optional[str] = None, + api_zip_url: Optional[str] = None, + deployment_title: Optional[str] = None, + provider: Optional[str] = None, + function_language: Optional[str] = None, + **kwargs + ): + super(StaticSiteZipDeploymentARMResource, self).__init__(kind=kind, **kwargs) + self.app_zip_url = app_zip_url + self.api_zip_url = api_zip_url + self.deployment_title = deployment_title + self.provider = provider + self.function_language = function_language + + +class Status(msrest.serialization.Model): + """Identify the status of the most severe insight generated by the detector. + + :param message: Descriptive message. + :type message: str + :param status_id: Level of the most severe insight generated by the detector. Possible values + include: "Critical", "Warning", "Info", "Success", "None". + :type status_id: str or ~azure.mgmt.web.v2020_12_01.models.InsightStatus + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'status_id': {'key': 'statusId', 'type': 'str'}, + } + + def __init__( + self, + *, + message: Optional[str] = None, + status_id: Optional[Union[str, "InsightStatus"]] = None, + **kwargs + ): + super(Status, self).__init__(**kwargs) + self.message = message + self.status_id = status_id + + +class StatusCodesBasedTrigger(msrest.serialization.Model): + """Trigger based on status code. + + :param status: HTTP status code. + :type status: int + :param sub_status: Request Sub Status. + :type sub_status: int + :param win32_status: Win32 error code. + :type win32_status: int + :param path: Request Path. + :type path: str + :param count: Request Count. + :type count: int + :param time_interval: Time interval. + :type time_interval: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'int'}, + 'sub_status': {'key': 'subStatus', 'type': 'int'}, + 'win32_status': {'key': 'win32Status', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[int] = None, + sub_status: Optional[int] = None, + win32_status: Optional[int] = None, + path: Optional[str] = None, + count: Optional[int] = None, + time_interval: Optional[str] = None, + **kwargs + ): + super(StatusCodesBasedTrigger, self).__init__(**kwargs) + self.status = status + self.sub_status = sub_status + self.win32_status = win32_status + self.path = path + self.count = count + self.time_interval = time_interval + + +class StatusCodesRangeBasedTrigger(msrest.serialization.Model): + """Trigger based on range of status codes. + + :param status_codes: HTTP status code. + :type status_codes: str + :param path: + :type path: str + :param count: Request Count. + :type count: int + :param time_interval: Time interval. + :type time_interval: str + """ + + _attribute_map = { + 'status_codes': {'key': 'statusCodes', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'time_interval': {'key': 'timeInterval', 'type': 'str'}, + } + + def __init__( + self, + *, + status_codes: Optional[str] = None, + path: Optional[str] = None, + count: Optional[int] = None, + time_interval: Optional[str] = None, + **kwargs + ): + super(StatusCodesRangeBasedTrigger, self).__init__(**kwargs) + self.status_codes = status_codes + self.path = path + self.count = count + self.time_interval = time_interval + + +class StorageMigrationOptions(ProxyOnlyResource): + """Options for app content migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param azurefiles_connection_string: AzureFiles connection string. + :type azurefiles_connection_string: str + :param azurefiles_share: AzureFiles share. + :type azurefiles_share: str + :param switch_site_after_migration: :code:`true`if the app should be switched + over; otherwise, :code:`false`. + :type switch_site_after_migration: bool + :param block_write_access_to_site: :code:`true` if the app should be read only + during copy operation; otherwise, :code:`false`. + :type block_write_access_to_site: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azurefiles_connection_string': {'key': 'properties.azurefilesConnectionString', 'type': 'str'}, + 'azurefiles_share': {'key': 'properties.azurefilesShare', 'type': 'str'}, + 'switch_site_after_migration': {'key': 'properties.switchSiteAfterMigration', 'type': 'bool'}, + 'block_write_access_to_site': {'key': 'properties.blockWriteAccessToSite', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + azurefiles_connection_string: Optional[str] = None, + azurefiles_share: Optional[str] = None, + switch_site_after_migration: Optional[bool] = False, + block_write_access_to_site: Optional[bool] = False, + **kwargs + ): + super(StorageMigrationOptions, self).__init__(kind=kind, **kwargs) + self.azurefiles_connection_string = azurefiles_connection_string + self.azurefiles_share = azurefiles_share + self.switch_site_after_migration = switch_site_after_migration + self.block_write_access_to_site = block_write_access_to_site + + +class StorageMigrationResponse(ProxyOnlyResource): + """Response for a migration of app content request. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar operation_id: When server starts the migration process, it will return an operation ID + identifying that particular migration operation. + :vartype operation_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'operation_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(StorageMigrationResponse, self).__init__(kind=kind, **kwargs) + self.operation_id = None + + +class StringDictionary(ProxyOnlyResource): + """String dictionary resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param properties: Settings. + :type properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + **kwargs + ): + super(StringDictionary, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class StringList(ProxyOnlyResource): + """String list resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param properties: List of string resources. + :type properties: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + properties: Optional[List[str]] = None, + **kwargs + ): + super(StringList, self).__init__(kind=kind, **kwargs) + self.properties = properties + + +class SupportTopic(msrest.serialization.Model): + """Defines a unique Support Topic. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Support Topic Id. + :vartype id: str + :ivar pes_id: Unique resource Id. + :vartype pes_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'pes_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'pes_id': {'key': 'pesId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SupportTopic, self).__init__(**kwargs) + self.id = None + self.pes_id = None + + +class SwiftVirtualNetwork(ProxyOnlyResource): + """Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param subnet_resource_id: The Virtual Network subnet's resource ID. This is the subnet that + this Web App will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined + first. + :type subnet_resource_id: str + :param swift_supported: A flag that specifies if the scale unit this Web App is on supports + Swift integration. + :type swift_supported: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet_resource_id': {'key': 'properties.subnetResourceId', 'type': 'str'}, + 'swift_supported': {'key': 'properties.swiftSupported', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + subnet_resource_id: Optional[str] = None, + swift_supported: Optional[bool] = None, + **kwargs + ): + super(SwiftVirtualNetwork, self).__init__(kind=kind, **kwargs) + self.subnet_resource_id = subnet_resource_id + self.swift_supported = swift_supported + + +class TldLegalAgreement(msrest.serialization.Model): + """Legal agreement for a top level domain. + + All required parameters must be populated in order to send to Azure. + + :param agreement_key: Required. Unique identifier for the agreement. + :type agreement_key: str + :param title: Required. Agreement title. + :type title: str + :param content: Required. Agreement details. + :type content: str + :param url: URL where a copy of the agreement details is hosted. + :type url: str + """ + + _validation = { + 'agreement_key': {'required': True}, + 'title': {'required': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'agreement_key': {'key': 'agreementKey', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + *, + agreement_key: str, + title: str, + content: str, + url: Optional[str] = None, + **kwargs + ): + super(TldLegalAgreement, self).__init__(**kwargs) + self.agreement_key = agreement_key + self.title = title + self.content = content + self.url = url + + +class TldLegalAgreementCollection(msrest.serialization.Model): + """Collection of top-level domain legal agreements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.TldLegalAgreement] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TldLegalAgreement]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["TldLegalAgreement"], + **kwargs + ): + super(TldLegalAgreementCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class TokenStore(ProxyOnlyResource): + """TokenStore. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param token_refresh_extension_hours: + :type token_refresh_extension_hours: float + :param file_system: + :type file_system: ~azure.mgmt.web.v2020_12_01.models.FileSystemTokenStore + :param azure_blob_storage: + :type azure_blob_storage: ~azure.mgmt.web.v2020_12_01.models.BlobStorageTokenStore + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'token_refresh_extension_hours': {'key': 'properties.tokenRefreshExtensionHours', 'type': 'float'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'FileSystemTokenStore'}, + 'azure_blob_storage': {'key': 'properties.azureBlobStorage', 'type': 'BlobStorageTokenStore'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + token_refresh_extension_hours: Optional[float] = None, + file_system: Optional["FileSystemTokenStore"] = None, + azure_blob_storage: Optional["BlobStorageTokenStore"] = None, + **kwargs + ): + super(TokenStore, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.token_refresh_extension_hours = token_refresh_extension_hours + self.file_system = file_system + self.azure_blob_storage = azure_blob_storage + + +class TopLevelDomain(ProxyOnlyResource): + """A top level domain object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param privacy: If :code:`true`, then the top level domain supports domain + privacy; otherwise, :code:`false`. + :type privacy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + privacy: Optional[bool] = None, + **kwargs + ): + super(TopLevelDomain, self).__init__(kind=kind, **kwargs) + self.privacy = privacy + + +class TopLevelDomainAgreementOption(msrest.serialization.Model): + """Options for retrieving the list of top level domain legal agreements. + + :param include_privacy: If :code:`true`, then the list of agreements will include + agreements for domain privacy as well; otherwise, :code:`false`. + :type include_privacy: bool + :param for_transfer: If :code:`true`, then the list of agreements will include + agreements for domain transfer as well; otherwise, :code:`false`. + :type for_transfer: bool + """ + + _attribute_map = { + 'include_privacy': {'key': 'includePrivacy', 'type': 'bool'}, + 'for_transfer': {'key': 'forTransfer', 'type': 'bool'}, + } + + def __init__( + self, + *, + include_privacy: Optional[bool] = None, + for_transfer: Optional[bool] = None, + **kwargs + ): + super(TopLevelDomainAgreementOption, self).__init__(**kwargs) + self.include_privacy = include_privacy + self.for_transfer = for_transfer + + +class TopLevelDomainCollection(msrest.serialization.Model): + """Collection of Top-level domains. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.TopLevelDomain] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TopLevelDomain]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["TopLevelDomain"], + **kwargs + ): + super(TopLevelDomainCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class TriggeredJobHistory(ProxyOnlyResource): + """Triggered Web Job History. List of Triggered Web Job Run Information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param runs: List of triggered web job runs. + :type runs: list[~azure.mgmt.web.v2020_12_01.models.TriggeredJobRun] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'runs': {'key': 'properties.runs', 'type': '[TriggeredJobRun]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + runs: Optional[List["TriggeredJobRun"]] = None, + **kwargs + ): + super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) + self.runs = runs + + +class TriggeredJobHistoryCollection(msrest.serialization.Model): + """Collection of Kudu continuous web job information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TriggeredJobHistory]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["TriggeredJobHistory"], + **kwargs + ): + super(TriggeredJobHistoryCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class TriggeredJobRun(ProxyOnlyResource): + """Triggered Web Job Run Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param web_job_id: Job ID. + :type web_job_id: str + :param web_job_name: Job name. + :type web_job_name: str + :param status: Job status. Possible values include: "Success", "Failed", "Error". + :type status: str or ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobStatus + :param start_time: Start time. + :type start_time: ~datetime.datetime + :param end_time: End time. + :type end_time: ~datetime.datetime + :param duration: Job duration. + :type duration: str + :param output_url: Output URL. + :type output_url: str + :param error_url: Error URL. + :type error_url: str + :param url: Job URL. + :type url: str + :param job_name: Job name. + :type job_name: str + :param trigger: Job trigger. + :type trigger: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'web_job_id': {'key': 'properties.web_job_id', 'type': 'str'}, + 'web_job_name': {'key': 'properties.web_job_name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.end_time', 'type': 'iso-8601'}, + 'duration': {'key': 'properties.duration', 'type': 'str'}, + 'output_url': {'key': 'properties.output_url', 'type': 'str'}, + 'error_url': {'key': 'properties.error_url', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'job_name': {'key': 'properties.job_name', 'type': 'str'}, + 'trigger': {'key': 'properties.trigger', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + web_job_id: Optional[str] = None, + web_job_name: Optional[str] = None, + status: Optional[Union[str, "TriggeredWebJobStatus"]] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + duration: Optional[str] = None, + output_url: Optional[str] = None, + error_url: Optional[str] = None, + url: Optional[str] = None, + job_name: Optional[str] = None, + trigger: Optional[str] = None, + **kwargs + ): + super(TriggeredJobRun, self).__init__(kind=kind, **kwargs) + self.web_job_id = web_job_id + self.web_job_name = web_job_name + self.status = status + self.start_time = start_time + self.end_time = end_time + self.duration = duration + self.output_url = output_url + self.error_url = error_url + self.url = url + self.job_name = job_name + self.trigger = trigger + + +class TriggeredWebJob(ProxyOnlyResource): + """Triggered Web Job Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param latest_run: Latest job run information. + :type latest_run: ~azure.mgmt.web.v2020_12_01.models.TriggeredJobRun + :param history_url: History URL. + :type history_url: str + :param scheduler_logs_url: Scheduler Logs URL. + :type scheduler_logs_url: str + :param run_command: Run command. + :type run_command: str + :param url: Job URL. + :type url: str + :param extra_info_url: Extra Info URL. + :type extra_info_url: str + :param web_job_type: Job type. Possible values include: "Continuous", "Triggered". + :type web_job_type: str or ~azure.mgmt.web.v2020_12_01.models.WebJobType + :param error: Error information. + :type error: str + :param using_sdk: Using SDK?. + :type using_sdk: bool + :param settings: Job settings. + :type settings: dict[str, object] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'latest_run': {'key': 'properties.latest_run', 'type': 'TriggeredJobRun'}, + 'history_url': {'key': 'properties.history_url', 'type': 'str'}, + 'scheduler_logs_url': {'key': 'properties.scheduler_logs_url', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + latest_run: Optional["TriggeredJobRun"] = None, + history_url: Optional[str] = None, + scheduler_logs_url: Optional[str] = None, + run_command: Optional[str] = None, + url: Optional[str] = None, + extra_info_url: Optional[str] = None, + web_job_type: Optional[Union[str, "WebJobType"]] = None, + error: Optional[str] = None, + using_sdk: Optional[bool] = None, + settings: Optional[Dict[str, object]] = None, + **kwargs + ): + super(TriggeredWebJob, self).__init__(kind=kind, **kwargs) + self.latest_run = latest_run + self.history_url = history_url + self.scheduler_logs_url = scheduler_logs_url + self.run_command = run_command + self.url = url + self.extra_info_url = extra_info_url + self.web_job_type = web_job_type + self.error = error + self.using_sdk = using_sdk + self.settings = settings + + +class TriggeredWebJobCollection(msrest.serialization.Model): + """Collection of Kudu continuous web job information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TriggeredWebJob]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["TriggeredWebJob"], + **kwargs + ): + super(TriggeredWebJobCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Twitter(ProxyOnlyResource): + """Twitter. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param enabled: + :type enabled: bool + :param registration: + :type registration: ~azure.mgmt.web.v2020_12_01.models.TwitterRegistration + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'registration': {'key': 'properties.registration', 'type': 'TwitterRegistration'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + enabled: Optional[bool] = None, + registration: Optional["TwitterRegistration"] = None, + **kwargs + ): + super(Twitter, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.registration = registration + + +class TwitterRegistration(ProxyOnlyResource): + """TwitterRegistration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param consumer_key: + :type consumer_key: str + :param consumer_secret_setting_name: + :type consumer_secret_setting_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'consumer_key': {'key': 'properties.consumerKey', 'type': 'str'}, + 'consumer_secret_setting_name': {'key': 'properties.consumerSecretSettingName', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + **kwargs + ): + super(TwitterRegistration, self).__init__(kind=kind, **kwargs) + self.consumer_key = consumer_key + self.consumer_secret_setting_name = consumer_secret_setting_name + + +class Usage(ProxyOnlyResource): + """Usage of the quota resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: Friendly name shown in the UI. + :vartype display_name: str + :ivar resource_name: Name of the quota resource. + :vartype resource_name: str + :ivar unit: Units of measurement for the quota resource. + :vartype unit: str + :ivar current_value: The current value of the resource counter. + :vartype current_value: long + :ivar limit: The resource limit. + :vartype limit: long + :ivar next_reset_time: Next reset time for the resource counter. + :vartype next_reset_time: ~datetime.datetime + :ivar compute_mode: Compute mode used for this usage. Possible values include: "Shared", + "Dedicated", "Dynamic". + :vartype compute_mode: str or ~azure.mgmt.web.v2020_12_01.models.ComputeModeOptions + :ivar site_mode: Site mode used for this usage. + :vartype site_mode: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + 'compute_mode': {'readonly': True}, + 'site_mode': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'unit': {'key': 'properties.unit', 'type': 'str'}, + 'current_value': {'key': 'properties.currentValue', 'type': 'long'}, + 'limit': {'key': 'properties.limit', 'type': 'long'}, + 'next_reset_time': {'key': 'properties.nextResetTime', 'type': 'iso-8601'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'str'}, + 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(Usage, self).__init__(kind=kind, **kwargs) + self.display_name = None + self.resource_name = None + self.unit = None + self.current_value = None + self.limit = None + self.next_reset_time = None + self.compute_mode = None + self.site_mode = None + + +class UsageCollection(msrest.serialization.Model): + """Collection of usages. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Usage] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Usage"], + **kwargs + ): + super(UsageCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class User(ProxyOnlyResource): + """User credentials used for publishing activity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param publishing_user_name: Username used for publishing. + :type publishing_user_name: str + :param publishing_password: Password used for publishing. + :type publishing_password: str + :param publishing_password_hash: Password hash used for publishing. + :type publishing_password_hash: str + :param publishing_password_hash_salt: Password hash salt used for publishing. + :type publishing_password_hash_salt: str + :param scm_uri: Url of SCM site. + :type scm_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publishing_user_name': {'key': 'properties.publishingUserName', 'type': 'str'}, + 'publishing_password': {'key': 'properties.publishingPassword', 'type': 'str'}, + 'publishing_password_hash': {'key': 'properties.publishingPasswordHash', 'type': 'str'}, + 'publishing_password_hash_salt': {'key': 'properties.publishingPasswordHashSalt', 'type': 'str'}, + 'scm_uri': {'key': 'properties.scmUri', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + publishing_user_name: Optional[str] = None, + publishing_password: Optional[str] = None, + publishing_password_hash: Optional[str] = None, + publishing_password_hash_salt: Optional[str] = None, + scm_uri: Optional[str] = None, + **kwargs + ): + super(User, self).__init__(kind=kind, **kwargs) + self.publishing_user_name = publishing_user_name + self.publishing_password = publishing_password + self.publishing_password_hash = publishing_password_hash + self.publishing_password_hash_salt = publishing_password_hash_salt + self.scm_uri = scm_uri + + +class ValidateRequest(msrest.serialization.Model): + """Resource validation request content. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Resource name to verify. + :type name: str + :param type: Required. Resource type used for verification. Possible values include: + "ServerFarm", "Site", "Microsoft.Web/hostingEnvironments". + :type type: str or ~azure.mgmt.web.v2020_12_01.models.ValidateResourceTypes + :param location: Required. Expected location of the resource. + :type location: str + :param server_farm_id: ARM resource ID of an App Service plan that would host the app. + :type server_farm_id: str + :param sku_name: Name of the target SKU for the App Service plan. + :type sku_name: str + :param need_linux_workers: :code:`true` if App Service plan is for Linux workers; + otherwise, :code:`false`. + :type need_linux_workers: bool + :param is_spot: :code:`true` if App Service plan is for Spot instances; otherwise, + :code:`false`. + :type is_spot: bool + :param capacity: Target capacity of the App Service plan (number of VMs). + :type capacity: int + :param hosting_environment: Name of App Service Environment where app or App Service plan + should be created. + :type hosting_environment: str + :param is_xenon: :code:`true` if App Service plan is running as a windows + container. + :type is_xenon: bool + :param container_registry_base_url: Base URL of the container registry. + :type container_registry_base_url: str + :param container_registry_username: Username for to access the container registry. + :type container_registry_username: str + :param container_registry_password: Password for to access the container registry. + :type container_registry_password: str + :param container_image_repository: Repository name (image name). + :type container_image_repository: str + :param container_image_tag: Image tag. + :type container_image_tag: str + :param container_image_platform: Platform (windows or linux). + :type container_image_platform: str + :param app_service_environment: App Service Environment Properties. + :type app_service_environment: ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironment + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'location': {'required': True}, + 'capacity': {'minimum': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, + 'need_linux_workers': {'key': 'properties.needLinuxWorkers', 'type': 'bool'}, + 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, + 'capacity': {'key': 'properties.capacity', 'type': 'int'}, + 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'container_registry_base_url': {'key': 'properties.containerRegistryBaseUrl', 'type': 'str'}, + 'container_registry_username': {'key': 'properties.containerRegistryUsername', 'type': 'str'}, + 'container_registry_password': {'key': 'properties.containerRegistryPassword', 'type': 'str'}, + 'container_image_repository': {'key': 'properties.containerImageRepository', 'type': 'str'}, + 'container_image_tag': {'key': 'properties.containerImageTag', 'type': 'str'}, + 'container_image_platform': {'key': 'properties.containerImagePlatform', 'type': 'str'}, + 'app_service_environment': {'key': 'properties.appServiceEnvironment', 'type': 'AppServiceEnvironment'}, + } + + def __init__( + self, + *, + name: str, + type: Union[str, "ValidateResourceTypes"], + location: str, + server_farm_id: Optional[str] = None, + sku_name: Optional[str] = None, + need_linux_workers: Optional[bool] = None, + is_spot: Optional[bool] = None, + capacity: Optional[int] = None, + hosting_environment: Optional[str] = None, + is_xenon: Optional[bool] = None, + container_registry_base_url: Optional[str] = None, + container_registry_username: Optional[str] = None, + container_registry_password: Optional[str] = None, + container_image_repository: Optional[str] = None, + container_image_tag: Optional[str] = None, + container_image_platform: Optional[str] = None, + app_service_environment: Optional["AppServiceEnvironment"] = None, + **kwargs + ): + super(ValidateRequest, self).__init__(**kwargs) + self.name = name + self.type = type + self.location = location + self.server_farm_id = server_farm_id + self.sku_name = sku_name + self.need_linux_workers = need_linux_workers + self.is_spot = is_spot + self.capacity = capacity + self.hosting_environment = hosting_environment + self.is_xenon = is_xenon + self.container_registry_base_url = container_registry_base_url + self.container_registry_username = container_registry_username + self.container_registry_password = container_registry_password + self.container_image_repository = container_image_repository + self.container_image_tag = container_image_tag + self.container_image_platform = container_image_platform + self.app_service_environment = app_service_environment + + +class ValidateResponse(msrest.serialization.Model): + """Describes the result of resource validation. + + :param status: Result of validation. + :type status: str + :param error: Error details for the case when validation fails. + :type error: ~azure.mgmt.web.v2020_12_01.models.ValidateResponseError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ValidateResponseError'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + error: Optional["ValidateResponseError"] = None, + **kwargs + ): + super(ValidateResponse, self).__init__(**kwargs) + self.status = status + self.error = error + + +class ValidateResponseError(msrest.serialization.Model): + """Error details for when validation fails. + + :param code: Validation error code. + :type code: str + :param message: Validation error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(ValidateResponseError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class VirtualApplication(msrest.serialization.Model): + """Virtual application in an app. + + :param virtual_path: Virtual path. + :type virtual_path: str + :param physical_path: Physical path. + :type physical_path: str + :param preload_enabled: :code:`true` if preloading is enabled; otherwise, + :code:`false`. + :type preload_enabled: bool + :param virtual_directories: Virtual directories for virtual application. + :type virtual_directories: list[~azure.mgmt.web.v2020_12_01.models.VirtualDirectory] + """ + + _attribute_map = { + 'virtual_path': {'key': 'virtualPath', 'type': 'str'}, + 'physical_path': {'key': 'physicalPath', 'type': 'str'}, + 'preload_enabled': {'key': 'preloadEnabled', 'type': 'bool'}, + 'virtual_directories': {'key': 'virtualDirectories', 'type': '[VirtualDirectory]'}, + } + + def __init__( + self, + *, + virtual_path: Optional[str] = None, + physical_path: Optional[str] = None, + preload_enabled: Optional[bool] = None, + virtual_directories: Optional[List["VirtualDirectory"]] = None, + **kwargs + ): + super(VirtualApplication, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + self.preload_enabled = preload_enabled + self.virtual_directories = virtual_directories + + +class VirtualDirectory(msrest.serialization.Model): + """Directory for virtual application. + + :param virtual_path: Path to virtual application. + :type virtual_path: str + :param physical_path: Physical path. + :type physical_path: str + """ + + _attribute_map = { + 'virtual_path': {'key': 'virtualPath', 'type': 'str'}, + 'physical_path': {'key': 'physicalPath', 'type': 'str'}, + } + + def __init__( + self, + *, + virtual_path: Optional[str] = None, + physical_path: Optional[str] = None, + **kwargs + ): + super(VirtualDirectory, self).__init__(**kwargs) + self.virtual_path = virtual_path + self.physical_path = physical_path + + +class VirtualIPMapping(msrest.serialization.Model): + """Virtual IP mapping. + + :param virtual_ip: Virtual IP address. + :type virtual_ip: str + :param internal_http_port: Internal HTTP port. + :type internal_http_port: int + :param internal_https_port: Internal HTTPS port. + :type internal_https_port: int + :param in_use: Is virtual IP mapping in use. + :type in_use: bool + :param service_name: name of the service that virtual IP is assigned to. + :type service_name: str + """ + + _attribute_map = { + 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, + 'internal_http_port': {'key': 'internalHttpPort', 'type': 'int'}, + 'internal_https_port': {'key': 'internalHttpsPort', 'type': 'int'}, + 'in_use': {'key': 'inUse', 'type': 'bool'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + } + + def __init__( + self, + *, + virtual_ip: Optional[str] = None, + internal_http_port: Optional[int] = None, + internal_https_port: Optional[int] = None, + in_use: Optional[bool] = None, + service_name: Optional[str] = None, + **kwargs + ): + super(VirtualIPMapping, self).__init__(**kwargs) + self.virtual_ip = virtual_ip + self.internal_http_port = internal_http_port + self.internal_https_port = internal_https_port + self.in_use = in_use + self.service_name = service_name + + +class VirtualNetworkProfile(msrest.serialization.Model): + """Specification for using a Virtual Network. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource id of the Virtual Network. + :type id: str + :ivar name: Name of the Virtual Network (read-only). + :vartype name: str + :ivar type: Resource type of the Virtual Network (read-only). + :vartype type: str + :param subnet: Subnet within the Virtual Network. + :type subnet: str + """ + + _validation = { + 'id': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + subnet: Optional[str] = None, + **kwargs + ): + super(VirtualNetworkProfile, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + self.subnet = subnet + + +class VnetGateway(ProxyOnlyResource): + """The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param vnet_name: The Virtual Network name. + :type vnet_name: str + :param vpn_package_uri: The URI where the VPN package can be downloaded. + :type vpn_package_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vpn_package_uri': {'key': 'properties.vpnPackageUri', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + vnet_name: Optional[str] = None, + vpn_package_uri: Optional[str] = None, + **kwargs + ): + super(VnetGateway, self).__init__(kind=kind, **kwargs) + self.vnet_name = vnet_name + self.vpn_package_uri = vpn_package_uri + + +class VnetInfo(ProxyOnlyResource): + """Virtual Network information contract. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param vnet_resource_id: The Virtual Network's resource ID. + :type vnet_resource_id: str + :ivar cert_thumbprint: The client certificate thumbprint. + :vartype cert_thumbprint: str + :param cert_blob: A certificate file (.cer) blob containing the public key of the private key + used to authenticate a + Point-To-Site VPN connection. + :type cert_blob: str + :ivar routes: The routes that this Virtual Network connection uses. + :vartype routes: list[~azure.mgmt.web.v2020_12_01.models.VnetRoute] + :ivar resync_required: :code:`true` if a resync is required; otherwise, + :code:`false`. + :vartype resync_required: bool + :param dns_servers: DNS servers to be used by this Virtual Network. This should be a + comma-separated list of IP addresses. + :type dns_servers: str + :param is_swift: Flag that is used to denote if this is VNET injection. + :type is_swift: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'cert_thumbprint': {'readonly': True}, + 'routes': {'readonly': True}, + 'resync_required': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'vnet_resource_id': {'key': 'properties.vnetResourceId', 'type': 'str'}, + 'cert_thumbprint': {'key': 'properties.certThumbprint', 'type': 'str'}, + 'cert_blob': {'key': 'properties.certBlob', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + 'is_swift': {'key': 'properties.isSwift', 'type': 'bool'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + vnet_resource_id: Optional[str] = None, + cert_blob: Optional[str] = None, + dns_servers: Optional[str] = None, + is_swift: Optional[bool] = None, + **kwargs + ): + super(VnetInfo, self).__init__(kind=kind, **kwargs) + self.vnet_resource_id = vnet_resource_id + self.cert_thumbprint = None + self.cert_blob = cert_blob + self.routes = None + self.resync_required = None + self.dns_servers = dns_servers + self.is_swift = is_swift + + +class VnetParameters(ProxyOnlyResource): + """The required set of inputs to validate a VNET. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param vnet_resource_group: The Resource Group of the VNET to be validated. + :type vnet_resource_group: str + :param vnet_name: The name of the VNET to be validated. + :type vnet_name: str + :param vnet_subnet_name: The subnet name to be validated. + :type vnet_subnet_name: str + :param subnet_resource_id: The ARM Resource ID of the subnet to validate. + :type subnet_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'vnet_resource_group': {'key': 'properties.vnetResourceGroup', 'type': 'str'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + 'subnet_resource_id': {'key': 'properties.subnetResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + vnet_resource_group: Optional[str] = None, + vnet_name: Optional[str] = None, + vnet_subnet_name: Optional[str] = None, + subnet_resource_id: Optional[str] = None, + **kwargs + ): + super(VnetParameters, self).__init__(kind=kind, **kwargs) + self.vnet_resource_group = vnet_resource_group + self.vnet_name = vnet_name + self.vnet_subnet_name = vnet_subnet_name + self.subnet_resource_id = subnet_resource_id + + +class VnetRoute(ProxyOnlyResource): + """Virtual Network route contract used to pass routing information for a Virtual Network. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param start_address: The starting address for this route. This may also include a CIDR + notation, in which case the end address must not be specified. + :type start_address: str + :param end_address: The ending address for this route. If the start address is specified in + CIDR notation, this must be omitted. + :type end_address: str + :param route_type: The type of route this is: + DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 + INHERITED - Routes inherited from the real Virtual Network routes + STATIC - Static route set on the app only + + These values will be used for syncing an app's routes with those from a Virtual Network. + Possible values include: "DEFAULT", "INHERITED", "STATIC". + :type route_type: str or ~azure.mgmt.web.v2020_12_01.models.RouteType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_address': {'key': 'properties.startAddress', 'type': 'str'}, + 'end_address': {'key': 'properties.endAddress', 'type': 'str'}, + 'route_type': {'key': 'properties.routeType', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + start_address: Optional[str] = None, + end_address: Optional[str] = None, + route_type: Optional[Union[str, "RouteType"]] = None, + **kwargs + ): + super(VnetRoute, self).__init__(kind=kind, **kwargs) + self.start_address = start_address + self.end_address = end_address + self.route_type = route_type + + +class VnetValidationFailureDetails(ProxyOnlyResource): + """A class that describes the reason for a validation failure. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param message: Text describing the validation outcome. + :type message: str + :param failed: A flag describing whether or not validation failed. + :type failed: bool + :param failed_tests: A list of tests that failed in the validation. + :type failed_tests: list[~azure.mgmt.web.v2020_12_01.models.VnetValidationTestFailure] + :param warnings: A list of warnings generated during validation. + :type warnings: list[~azure.mgmt.web.v2020_12_01.models.VnetValidationTestFailure] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'message': {'key': 'properties.message', 'type': 'str'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + 'warnings': {'key': 'properties.warnings', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + message: Optional[str] = None, + failed: Optional[bool] = None, + failed_tests: Optional[List["VnetValidationTestFailure"]] = None, + warnings: Optional[List["VnetValidationTestFailure"]] = None, + **kwargs + ): + super(VnetValidationFailureDetails, self).__init__(kind=kind, **kwargs) + self.message = message + self.failed = failed + self.failed_tests = failed_tests + self.warnings = warnings + + +class VnetValidationTestFailure(ProxyOnlyResource): + """A class that describes a test that failed during NSG and UDR validation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param test_name: The name of the test that failed. + :type test_name: str + :param details: The details of what caused the failure, e.g. the blocking rule name, etc. + :type details: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'test_name': {'key': 'properties.testName', 'type': 'str'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + test_name: Optional[str] = None, + details: Optional[str] = None, + **kwargs + ): + super(VnetValidationTestFailure, self).__init__(kind=kind, **kwargs) + self.test_name = test_name + self.details = details + + +class WebAppCollection(msrest.serialization.Model): + """Collection of App Service apps. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.Site] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Site]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Site"], + **kwargs + ): + super(WebAppCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WebAppInstanceStatusCollection(msrest.serialization.Model): + """Collection of app instances. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebSiteInstanceStatus]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["WebSiteInstanceStatus"], + **kwargs + ): + super(WebAppInstanceStatusCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WebAppMajorVersion(msrest.serialization.Model): + """Web App stack major version. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_text: Web App stack major version (display only). + :vartype display_text: str + :ivar value: Web App stack major version name. + :vartype value: str + :ivar minor_versions: Minor versions associated with the major version. + :vartype minor_versions: list[~azure.mgmt.web.v2020_12_01.models.WebAppMinorVersion] + """ + + _validation = { + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'minor_versions': {'readonly': True}, + } + + _attribute_map = { + 'display_text': {'key': 'displayText', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'minor_versions': {'key': 'minorVersions', 'type': '[WebAppMinorVersion]'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppMajorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.minor_versions = None + + +class WebAppMinorVersion(msrest.serialization.Model): + """Web App stack minor version. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_text: Web App stack minor version (display only). + :vartype display_text: str + :ivar value: Web App stack major version name. + :vartype value: str + :ivar stack_settings: Settings associated with the minor version. + :vartype stack_settings: ~azure.mgmt.web.v2020_12_01.models.WebAppRuntimes + """ + + _validation = { + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'stack_settings': {'readonly': True}, + } + + _attribute_map = { + 'display_text': {'key': 'displayText', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'stack_settings': {'key': 'stackSettings', 'type': 'WebAppRuntimes'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppMinorVersion, self).__init__(**kwargs) + self.display_text = None + self.value = None + self.stack_settings = None + + +class WebAppRuntimes(msrest.serialization.Model): + """Web App stack runtimes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar linux_runtime_settings: Linux-specific settings associated with the minor version. + :vartype linux_runtime_settings: ~azure.mgmt.web.v2020_12_01.models.WebAppRuntimeSettings + :ivar windows_runtime_settings: Windows-specific settings associated with the minor version. + :vartype windows_runtime_settings: ~azure.mgmt.web.v2020_12_01.models.WebAppRuntimeSettings + :ivar linux_container_settings: Linux-specific settings associated with the Java container + minor version. + :vartype linux_container_settings: + ~azure.mgmt.web.v2020_12_01.models.LinuxJavaContainerSettings + :ivar windows_container_settings: Windows-specific settings associated with the Java container + minor version. + :vartype windows_container_settings: + ~azure.mgmt.web.v2020_12_01.models.WindowsJavaContainerSettings + """ + + _validation = { + 'linux_runtime_settings': {'readonly': True}, + 'windows_runtime_settings': {'readonly': True}, + 'linux_container_settings': {'readonly': True}, + 'windows_container_settings': {'readonly': True}, + } + + _attribute_map = { + 'linux_runtime_settings': {'key': 'linuxRuntimeSettings', 'type': 'WebAppRuntimeSettings'}, + 'windows_runtime_settings': {'key': 'windowsRuntimeSettings', 'type': 'WebAppRuntimeSettings'}, + 'linux_container_settings': {'key': 'linuxContainerSettings', 'type': 'LinuxJavaContainerSettings'}, + 'windows_container_settings': {'key': 'windowsContainerSettings', 'type': 'WindowsJavaContainerSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppRuntimes, self).__init__(**kwargs) + self.linux_runtime_settings = None + self.windows_runtime_settings = None + self.linux_container_settings = None + self.windows_container_settings = None + + +class WebAppRuntimeSettings(msrest.serialization.Model): + """Web App runtime settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar runtime_version: Web App stack minor version (runtime only). + :vartype runtime_version: str + :ivar remote_debugging_supported: :code:`true` if remote debugging is supported + for the stack; otherwise, :code:`false`. + :vartype remote_debugging_supported: bool + :ivar app_insights_settings: Application Insights settings associated with the minor version. + :vartype app_insights_settings: + ~azure.mgmt.web.v2020_12_01.models.AppInsightsWebAppStackSettings + :ivar git_hub_action_settings: GitHub Actions settings associated with the minor version. + :vartype git_hub_action_settings: + ~azure.mgmt.web.v2020_12_01.models.GitHubActionWebAppStackSettings + :ivar is_preview: :code:`true` if the stack is in preview; otherwise, + :code:`false`. + :vartype is_preview: bool + :ivar is_deprecated: :code:`true` if the stack is deprecated; otherwise, + :code:`false`. + :vartype is_deprecated: bool + :ivar is_hidden: :code:`true` if the stack should be hidden; otherwise, + :code:`false`. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: ~datetime.datetime + :ivar is_auto_update: :code:`true` if the stack version is auto-updated; + otherwise, :code:`false`. + :vartype is_auto_update: bool + :ivar is_early_access: :code:`true` if the minor version is early-access; + otherwise, :code:`false`. + :vartype is_early_access: bool + """ + + _validation = { + 'runtime_version': {'readonly': True}, + 'remote_debugging_supported': {'readonly': True}, + 'app_insights_settings': {'readonly': True}, + 'git_hub_action_settings': {'readonly': True}, + 'is_preview': {'readonly': True}, + 'is_deprecated': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'end_of_life_date': {'readonly': True}, + 'is_auto_update': {'readonly': True}, + 'is_early_access': {'readonly': True}, + } + + _attribute_map = { + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'remote_debugging_supported': {'key': 'remoteDebuggingSupported', 'type': 'bool'}, + 'app_insights_settings': {'key': 'appInsightsSettings', 'type': 'AppInsightsWebAppStackSettings'}, + 'git_hub_action_settings': {'key': 'gitHubActionSettings', 'type': 'GitHubActionWebAppStackSettings'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'is_auto_update': {'key': 'isAutoUpdate', 'type': 'bool'}, + 'is_early_access': {'key': 'isEarlyAccess', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(WebAppRuntimeSettings, self).__init__(**kwargs) + self.runtime_version = None + self.remote_debugging_supported = None + self.app_insights_settings = None + self.git_hub_action_settings = None + self.is_preview = None + self.is_deprecated = None + self.is_hidden = None + self.end_of_life_date = None + self.is_auto_update = None + self.is_early_access = None + + +class WebAppStack(ProxyOnlyResource): + """Web App stack. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Web App stack location. + :vartype location: str + :ivar display_text: Web App stack (display only). + :vartype display_text: str + :ivar value: Web App stack name. + :vartype value: str + :ivar major_versions: List of major versions available. + :vartype major_versions: list[~azure.mgmt.web.v2020_12_01.models.WebAppMajorVersion] + :ivar preferred_os: Web App stack preferred OS. Possible values include: "Windows", "Linux". + :vartype preferred_os: str or ~azure.mgmt.web.v2020_12_01.models.StackPreferredOs + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'display_text': {'readonly': True}, + 'value': {'readonly': True}, + 'major_versions': {'readonly': True}, + 'preferred_os': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'display_text': {'key': 'properties.displayText', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'major_versions': {'key': 'properties.majorVersions', 'type': '[WebAppMajorVersion]'}, + 'preferred_os': {'key': 'properties.preferredOs', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + **kwargs + ): + super(WebAppStack, self).__init__(kind=kind, **kwargs) + self.location = None + self.display_text = None + self.value = None + self.major_versions = None + self.preferred_os = None + + +class WebAppStackCollection(msrest.serialization.Model): + """Collection of Web app Stacks. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.WebAppStack] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebAppStack]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["WebAppStack"], + **kwargs + ): + super(WebAppStackCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WebJob(ProxyOnlyResource): + """Web Job Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param run_command: Run command. + :type run_command: str + :param url: Job URL. + :type url: str + :param extra_info_url: Extra Info URL. + :type extra_info_url: str + :param web_job_type: Job type. Possible values include: "Continuous", "Triggered". + :type web_job_type: str or ~azure.mgmt.web.v2020_12_01.models.WebJobType + :param error: Error information. + :type error: str + :param using_sdk: Using SDK?. + :type using_sdk: bool + :param settings: Job settings. + :type settings: dict[str, object] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'str'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + run_command: Optional[str] = None, + url: Optional[str] = None, + extra_info_url: Optional[str] = None, + web_job_type: Optional[Union[str, "WebJobType"]] = None, + error: Optional[str] = None, + using_sdk: Optional[bool] = None, + settings: Optional[Dict[str, object]] = None, + **kwargs + ): + super(WebJob, self).__init__(kind=kind, **kwargs) + self.run_command = run_command + self.url = url + self.extra_info_url = extra_info_url + self.web_job_type = web_job_type + self.error = error + self.using_sdk = using_sdk + self.settings = settings + + +class WebJobCollection(msrest.serialization.Model): + """Collection of Kudu web job information elements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.WebJob] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebJob]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["WebJob"], + **kwargs + ): + super(WebJobCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WebSiteInstanceStatus(ProxyOnlyResource): + """WebSiteInstanceStatus. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param state: Possible values include: "READY", "STOPPED", "UNKNOWN". + :type state: str or ~azure.mgmt.web.v2020_12_01.models.SiteRuntimeState + :param status_url: Link to the GetStatusApi in Kudu. + :type status_url: str + :param detector_url: Link to the Diagnose and Solve Portal. + :type detector_url: str + :param console_url: Link to the console to web app instance. + :type console_url: str + :param health_check_url: Link to the console to web app instance. + :type health_check_url: str + :param containers: Dictionary of :code:``. + :type containers: dict[str, ~azure.mgmt.web.v2020_12_01.models.ContainerInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'status_url': {'key': 'properties.statusUrl', 'type': 'str'}, + 'detector_url': {'key': 'properties.detectorUrl', 'type': 'str'}, + 'console_url': {'key': 'properties.consoleUrl', 'type': 'str'}, + 'health_check_url': {'key': 'properties.healthCheckUrl', 'type': 'str'}, + 'containers': {'key': 'properties.containers', 'type': '{ContainerInfo}'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + state: Optional[Union[str, "SiteRuntimeState"]] = None, + status_url: Optional[str] = None, + detector_url: Optional[str] = None, + console_url: Optional[str] = None, + health_check_url: Optional[str] = None, + containers: Optional[Dict[str, "ContainerInfo"]] = None, + **kwargs + ): + super(WebSiteInstanceStatus, self).__init__(kind=kind, **kwargs) + self.state = state + self.status_url = status_url + self.detector_url = detector_url + self.console_url = console_url + self.health_check_url = health_check_url + self.containers = containers + + +class WindowsJavaContainerSettings(msrest.serialization.Model): + """Windows Java Container settings. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar java_container: Java container (runtime only). + :vartype java_container: str + :ivar java_container_version: Java container version (runtime only). + :vartype java_container_version: str + :ivar is_preview: :code:`true` if the stack is in preview; otherwise, + :code:`false`. + :vartype is_preview: bool + :ivar is_deprecated: :code:`true` if the stack is deprecated; otherwise, + :code:`false`. + :vartype is_deprecated: bool + :ivar is_hidden: :code:`true` if the stack should be hidden; otherwise, + :code:`false`. + :vartype is_hidden: bool + :ivar end_of_life_date: End-of-life date for the minor version. + :vartype end_of_life_date: ~datetime.datetime + :ivar is_auto_update: :code:`true` if the stack version is auto-updated; + otherwise, :code:`false`. + :vartype is_auto_update: bool + :ivar is_early_access: :code:`true` if the minor version is early-access; + otherwise, :code:`false`. + :vartype is_early_access: bool + """ + + _validation = { + 'java_container': {'readonly': True}, + 'java_container_version': {'readonly': True}, + 'is_preview': {'readonly': True}, + 'is_deprecated': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'end_of_life_date': {'readonly': True}, + 'is_auto_update': {'readonly': True}, + 'is_early_access': {'readonly': True}, + } + + _attribute_map = { + 'java_container': {'key': 'javaContainer', 'type': 'str'}, + 'java_container_version': {'key': 'javaContainerVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'is_deprecated': {'key': 'isDeprecated', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'is_auto_update': {'key': 'isAutoUpdate', 'type': 'bool'}, + 'is_early_access': {'key': 'isEarlyAccess', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(WindowsJavaContainerSettings, self).__init__(**kwargs) + self.java_container = None + self.java_container_version = None + self.is_preview = None + self.is_deprecated = None + self.is_hidden = None + self.end_of_life_date = None + self.is_auto_update = None + self.is_early_access = None + + +class WorkerPoolCollection(msrest.serialization.Model): + """Collection of worker pools. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkerPoolResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["WorkerPoolResource"], + **kwargs + ): + super(WorkerPoolCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WorkerPoolResource(ProxyOnlyResource): + """Worker pool of an App Service Environment ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param sku: Description of a SKU for a scalable resource. + :type sku: ~azure.mgmt.web.v2020_12_01.models.SkuDescription + :param worker_size_id: Worker size ID for referencing this worker pool. + :type worker_size_id: int + :param compute_mode: Shared or dedicated app hosting. Possible values include: "Shared", + "Dedicated", "Dynamic". + :type compute_mode: str or ~azure.mgmt.web.v2020_12_01.models.ComputeModeOptions + :param worker_size: VM size of the worker pool instances. + :type worker_size: str + :param worker_count: Number of instances in the worker pool. + :type worker_count: int + :ivar instance_names: Names of all instances in the worker pool (read only). + :vartype instance_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'instance_names': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SkuDescription'}, + 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, + 'compute_mode': {'key': 'properties.computeMode', 'type': 'str'}, + 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, + 'worker_count': {'key': 'properties.workerCount', 'type': 'int'}, + 'instance_names': {'key': 'properties.instanceNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + sku: Optional["SkuDescription"] = None, + worker_size_id: Optional[int] = None, + compute_mode: Optional[Union[str, "ComputeModeOptions"]] = None, + worker_size: Optional[str] = None, + worker_count: Optional[int] = None, + **kwargs + ): + super(WorkerPoolResource, self).__init__(kind=kind, **kwargs) + self.sku = sku + self.worker_size_id = worker_size_id + self.compute_mode = compute_mode + self.worker_size = worker_size + self.worker_count = worker_count + self.instance_names = None diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_web_site_management_client_enums.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_web_site_management_client_enums.py new file mode 100644 index 000000000000..b857c1220434 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/models/_web_site_management_client_enums.py @@ -0,0 +1,852 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + REGISTRATION_STATUS_NOT_SUPPORTED_FOR_RENEWAL = "RegistrationStatusNotSupportedForRenewal" + EXPIRATION_NOT_IN_RENEWAL_TIME_RANGE = "ExpirationNotInRenewalTimeRange" + SUBSCRIPTION_NOT_ACTIVE = "SubscriptionNotActive" + +class AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + REGISTRATION_STATUS_NOT_SUPPORTED_FOR_RENEWAL = "RegistrationStatusNotSupportedForRenewal" + EXPIRATION_NOT_IN_RENEWAL_TIME_RANGE = "ExpirationNotInRenewalTimeRange" + SUBSCRIPTION_NOT_ACTIVE = "SubscriptionNotActive" + +class AppServicePlanRestrictions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """App Service plans this offer is restricted to. + """ + + NONE = "None" + FREE = "Free" + SHARED = "Shared" + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + +class AutoHealActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Predefined action to be taken. + """ + + RECYCLE = "Recycle" + LOG_EVENT = "LogEvent" + CUSTOM_ACTION = "CustomAction" + +class AzureResourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the Azure resource the hostname is assigned to. + """ + + WEBSITE = "Website" + TRAFFIC_MANAGER = "TrafficManager" + +class AzureStorageState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """State of the storage account. + """ + + OK = "Ok" + INVALID_CREDENTIALS = "InvalidCredentials" + INVALID_SHARE = "InvalidShare" + NOT_VALIDATED = "NotValidated" + +class AzureStorageType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of storage. + """ + + AZURE_FILES = "AzureFiles" + AZURE_BLOB = "AzureBlob" + +class BackupItemStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Backup status. + """ + + IN_PROGRESS = "InProgress" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + TIMED_OUT = "TimedOut" + CREATED = "Created" + SKIPPED = "Skipped" + PARTIALLY_SUCCEEDED = "PartiallySucceeded" + DELETE_IN_PROGRESS = "DeleteInProgress" + DELETE_FAILED = "DeleteFailed" + DELETED = "Deleted" + +class BackupRestoreOperationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Operation type. + """ + + DEFAULT = "Default" + CLONE = "Clone" + RELOCATION = "Relocation" + SNAPSHOT = "Snapshot" + CLOUD_FS = "CloudFS" + +class BuildStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status of the static site build. + """ + + WAITING_FOR_DEPLOYMENT = "WaitingForDeployment" + UPLOADING = "Uploading" + DEPLOYING = "Deploying" + READY = "Ready" + FAILED = "Failed" + DELETING = "Deleting" + DETACHED = "Detached" + +class BuiltInAuthenticationProvider(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The default authentication provider to use when multiple providers are configured. + This setting is only needed if multiple providers are configured and the unauthenticated client + action is set to "RedirectToLoginPage". + """ + + AZURE_ACTIVE_DIRECTORY = "AzureActiveDirectory" + FACEBOOK = "Facebook" + GOOGLE = "Google" + MICROSOFT_ACCOUNT = "MicrosoftAccount" + TWITTER = "Twitter" + GITHUB = "Github" + +class CertificateOrderActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Action type. + """ + + CERTIFICATE_ISSUED = "CertificateIssued" + CERTIFICATE_ORDER_CANCELED = "CertificateOrderCanceled" + CERTIFICATE_ORDER_CREATED = "CertificateOrderCreated" + CERTIFICATE_REVOKED = "CertificateRevoked" + DOMAIN_VALIDATION_COMPLETE = "DomainValidationComplete" + FRAUD_DETECTED = "FraudDetected" + ORG_NAME_CHANGE = "OrgNameChange" + ORG_VALIDATION_COMPLETE = "OrgValidationComplete" + SAN_DROP = "SanDrop" + FRAUD_CLEARED = "FraudCleared" + CERTIFICATE_EXPIRED = "CertificateExpired" + CERTIFICATE_EXPIRATION_WARNING = "CertificateExpirationWarning" + FRAUD_DOCUMENTATION_REQUIRED = "FraudDocumentationRequired" + UNKNOWN = "Unknown" + +class CertificateOrderStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current order status. + """ + + PENDINGISSUANCE = "Pendingissuance" + ISSUED = "Issued" + REVOKED = "Revoked" + CANCELED = "Canceled" + DENIED = "Denied" + PENDINGREVOCATION = "Pendingrevocation" + PENDING_REKEY = "PendingRekey" + UNUSED = "Unused" + EXPIRED = "Expired" + NOT_SUBMITTED = "NotSubmitted" + +class CertificateProductType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Certificate product type. + """ + + STANDARD_DOMAIN_VALIDATED_SSL = "StandardDomainValidatedSsl" + STANDARD_DOMAIN_VALIDATED_WILD_CARD_SSL = "StandardDomainValidatedWildCardSsl" + +class Channels(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """List of channels that this recommendation can apply. + """ + + NOTIFICATION = "Notification" + API = "Api" + EMAIL = "Email" + WEBHOOK = "Webhook" + ALL = "All" + +class CheckNameResourceTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Resource type used for verification. + """ + + SITE = "Site" + SLOT = "Slot" + HOSTING_ENVIRONMENT = "HostingEnvironment" + PUBLISHING_USER = "PublishingUser" + MICROSOFT_WEB_SITES = "Microsoft.Web/sites" + MICROSOFT_WEB_SITES_SLOTS = "Microsoft.Web/sites/slots" + MICROSOFT_WEB_HOSTING_ENVIRONMENTS = "Microsoft.Web/hostingEnvironments" + MICROSOFT_WEB_PUBLISHING_USERS = "Microsoft.Web/publishingUsers" + +class ClientCertMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """This composes with ClientCertEnabled setting. + + + * ClientCertEnabled: false means ClientCert is ignored. + * ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or + accepted. + """ + + REQUIRED = "Required" + OPTIONAL = "Optional" + OPTIONAL_INTERACTIVE_USER = "OptionalInteractiveUser" + +class CloneAbilityResult(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of app. + """ + + CLONEABLE = "Cloneable" + PARTIALLY_CLONEABLE = "PartiallyCloneable" + NOT_CLONEABLE = "NotCloneable" + +class ComputeModeOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Shared/dedicated workers. + """ + + SHARED = "Shared" + DEDICATED = "Dedicated" + DYNAMIC = "Dynamic" + +class ConnectionStringType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of database. + """ + + MY_SQL = "MySql" + SQL_SERVER = "SQLServer" + SQL_AZURE = "SQLAzure" + CUSTOM = "Custom" + NOTIFICATION_HUB = "NotificationHub" + SERVICE_BUS = "ServiceBus" + EVENT_HUB = "EventHub" + API_HUB = "ApiHub" + DOC_DB = "DocDb" + REDIS_CACHE = "RedisCache" + POSTGRE_SQL = "PostgreSQL" + +class ContinuousWebJobStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Job status. + """ + + INITIALIZING = "Initializing" + STARTING = "Starting" + RUNNING = "Running" + PENDING_RESTART = "PendingRestart" + STOPPED = "Stopped" + +class CookieExpirationConvention(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + FIXED_TIME = "FixedTime" + IDENTITY_PROVIDER_DERIVED = "IdentityProviderDerived" + +class CustomDomainStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status of the custom domain + """ + + RETRIEVING_VALIDATION_TOKEN = "RetrievingValidationToken" + VALIDATING = "Validating" + ADDING = "Adding" + READY = "Ready" + FAILED = "Failed" + DELETING = "Deleting" + +class CustomHostNameDnsRecordType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the DNS record. + """ + + C_NAME = "CName" + A = "A" + +class DatabaseType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Database type (e.g. SqlAzure / MySql). + """ + + SQL_AZURE = "SqlAzure" + MY_SQL = "MySql" + LOCAL_MY_SQL = "LocalMySql" + POSTGRE_SQL = "PostgreSql" + +class DetectorType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether this detector is an Analysis Detector or not. + """ + + DETECTOR = "Detector" + ANALYSIS = "Analysis" + CATEGORY_OVERVIEW = "CategoryOverview" + +class DnsType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current DNS type + """ + + AZURE_DNS = "AzureDns" + DEFAULT_DOMAIN_REGISTRAR_DNS = "DefaultDomainRegistrarDns" + +class DnsVerificationTestResult(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """DNS verification test result. + """ + + PASSED = "Passed" + FAILED = "Failed" + SKIPPED = "Skipped" + +class DomainPatchResourcePropertiesDomainNotRenewableReasonsItem(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + REGISTRATION_STATUS_NOT_SUPPORTED_FOR_RENEWAL = "RegistrationStatusNotSupportedForRenewal" + EXPIRATION_NOT_IN_RENEWAL_TIME_RANGE = "ExpirationNotInRenewalTimeRange" + SUBSCRIPTION_NOT_ACTIVE = "SubscriptionNotActive" + +class DomainPropertiesDomainNotRenewableReasonsItem(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + REGISTRATION_STATUS_NOT_SUPPORTED_FOR_RENEWAL = "RegistrationStatusNotSupportedForRenewal" + EXPIRATION_NOT_IN_RENEWAL_TIME_RANGE = "ExpirationNotInRenewalTimeRange" + SUBSCRIPTION_NOT_ACTIVE = "SubscriptionNotActive" + +class DomainStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Domain registration status. + """ + + ACTIVE = "Active" + AWAITING = "Awaiting" + CANCELLED = "Cancelled" + CONFISCATED = "Confiscated" + DISABLED = "Disabled" + EXCLUDED = "Excluded" + EXPIRED = "Expired" + FAILED = "Failed" + HELD = "Held" + LOCKED = "Locked" + PARKED = "Parked" + PENDING = "Pending" + RESERVED = "Reserved" + REVERTED = "Reverted" + SUSPENDED = "Suspended" + TRANSFERRED = "Transferred" + UNKNOWN = "Unknown" + UNLOCKED = "Unlocked" + UNPARKED = "Unparked" + UPDATED = "Updated" + JSON_CONVERTER_FAILED = "JsonConverterFailed" + +class DomainType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Valid values are Regular domain: Azure will charge the full price of domain registration, + SoftDeleted: Purchasing this domain will simply restore it and this operation will not cost + anything. + """ + + REGULAR = "Regular" + SOFT_DELETED = "SoftDeleted" + +class Enum4(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + WINDOWS = "Windows" + LINUX = "Linux" + WINDOWS_FUNCTIONS = "WindowsFunctions" + LINUX_FUNCTIONS = "LinuxFunctions" + ALL = "All" + +class Enum5(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + WINDOWS = "Windows" + LINUX = "Linux" + ALL = "All" + +class Enum6(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + WINDOWS = "Windows" + LINUX = "Linux" + ALL = "All" + +class Enum7(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + WINDOWS = "Windows" + LINUX = "Linux" + ALL = "All" + +class Enum8(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + WINDOWS = "Windows" + LINUX = "Linux" + ALL = "All" + +class Enum9(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + WINDOWS = "Windows" + LINUX = "Linux" + WINDOWS_FUNCTIONS = "WindowsFunctions" + LINUX_FUNCTIONS = "LinuxFunctions" + ALL = "All" + +class ForwardProxyConvention(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + NO_PROXY = "NoProxy" + STANDARD = "Standard" + CUSTOM = "Custom" + +class FrequencyUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The unit of time for how often the backup should be executed (e.g. for weekly backup, this + should be set to Day and FrequencyInterval should be set to 7) + """ + + DAY = "Day" + HOUR = "Hour" + +class FtpsState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """State of FTP / FTPS service + """ + + ALL_ALLOWED = "AllAllowed" + FTPS_ONLY = "FtpsOnly" + DISABLED = "Disabled" + +class HostingEnvironmentStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current status of the App Service Environment. + """ + + PREPARING = "Preparing" + READY = "Ready" + SCALING = "Scaling" + DELETING = "Deleting" + +class HostNameType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the hostname. + """ + + VERIFIED = "Verified" + MANAGED = "Managed" + +class HostType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates whether the hostname is a standard or repository hostname. + """ + + STANDARD = "Standard" + REPOSITORY = "Repository" + +class InAvailabilityReasonType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """:code:`Invalid` indicates the name provided does not match Azure App Service + naming requirements. :code:`AlreadyExists` indicates that the name is already in + use and is therefore unavailable. + """ + + INVALID = "Invalid" + ALREADY_EXISTS = "AlreadyExists" + +class InsightStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Level of the most severe insight generated by the detector. + """ + + CRITICAL = "Critical" + WARNING = "Warning" + INFO = "Info" + SUCCESS = "Success" + NONE = "None" + +class IpFilterTag(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Defines what this IP filter will be used for. This is to support IP filtering on proxies. + """ + + DEFAULT = "Default" + XFF_PROXY = "XffProxy" + SERVICE_TAG = "ServiceTag" + +class IssueType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Represents the type of the Detector + """ + + SERVICE_INCIDENT = "ServiceIncident" + APP_DEPLOYMENT = "AppDeployment" + APP_CRASH = "AppCrash" + RUNTIME_ISSUE_DETECTED = "RuntimeIssueDetected" + ASE_DEPLOYMENT = "AseDeployment" + USER_ISSUE = "UserIssue" + PLATFORM_ISSUE = "PlatformIssue" + OTHER = "Other" + +class KeyVaultSecretStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of the Key Vault secret. + """ + + INITIALIZED = "Initialized" + WAITING_ON_CERTIFICATE_ORDER = "WaitingOnCertificateOrder" + SUCCEEDED = "Succeeded" + CERTIFICATE_ORDER_FAILED = "CertificateOrderFailed" + OPERATION_NOT_PERMITTED_ON_KEY_VAULT = "OperationNotPermittedOnKeyVault" + AZURE_SERVICE_UNAUTHORIZED_TO_ACCESS_KEY_VAULT = "AzureServiceUnauthorizedToAccessKeyVault" + KEY_VAULT_DOES_NOT_EXIST = "KeyVaultDoesNotExist" + KEY_VAULT_SECRET_DOES_NOT_EXIST = "KeyVaultSecretDoesNotExist" + UNKNOWN_ERROR = "UnknownError" + EXTERNAL_PRIVATE_KEY = "ExternalPrivateKey" + UNKNOWN = "Unknown" + +class LoadBalancingMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies which endpoints to serve internally in the Virtual Network for the App Service + Environment. + """ + + NONE = "None" + WEB = "Web" + PUBLISHING = "Publishing" + WEB_PUBLISHING = "Web, Publishing" + +class LogLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Log level. + """ + + OFF = "Off" + VERBOSE = "Verbose" + INFORMATION = "Information" + WARNING = "Warning" + ERROR = "Error" + +class ManagedPipelineMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Managed pipeline mode. + """ + + INTEGRATED = "Integrated" + CLASSIC = "Classic" + +class ManagedServiceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of managed service identity. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + NONE = "None" + +class MSDeployLogEntryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Log entry type + """ + + MESSAGE = "Message" + WARNING = "Warning" + ERROR = "Error" + +class MSDeployProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state + """ + + ACCEPTED = "accepted" + RUNNING = "running" + SUCCEEDED = "succeeded" + FAILED = "failed" + CANCELED = "canceled" + +class MySqlMigrationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of migration operation to be done + """ + + LOCAL_TO_REMOTE = "LocalToRemote" + REMOTE_TO_LOCAL = "RemoteToLocal" + +class NotificationLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Level indicating how critical this recommendation can impact. + """ + + CRITICAL = "Critical" + WARNING = "Warning" + INFORMATION = "Information" + NON_URGENT_SUGGESTION = "NonUrgentSuggestion" + +class OperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current status of the operation. + """ + + IN_PROGRESS = "InProgress" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + TIMED_OUT = "TimedOut" + CREATED = "Created" + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of certificate order. + """ + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELED = "Canceled" + IN_PROGRESS = "InProgress" + DELETING = "Deleting" + +class PublicCertificateLocation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Public Certificate Location + """ + + CURRENT_USER_MY = "CurrentUserMy" + LOCAL_MACHINE_MY = "LocalMachineMy" + UNKNOWN = "Unknown" + +class PublishingProfileFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp + """ + + FILE_ZILLA3 = "FileZilla3" + WEB_DEPLOY = "WebDeploy" + FTP = "Ftp" + +class RedundancyMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Site redundancy mode + """ + + NONE = "None" + MANUAL = "Manual" + FAILOVER = "Failover" + ACTIVE_ACTIVE = "ActiveActive" + GEO_REDUNDANT = "GeoRedundant" + +class RenderingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Rendering Type + """ + + NO_GRAPH = "NoGraph" + TABLE = "Table" + TIME_SERIES = "TimeSeries" + TIME_SERIES_PER_INSTANCE = "TimeSeriesPerInstance" + PIE_CHART = "PieChart" + DATA_SUMMARY = "DataSummary" + EMAIL = "Email" + INSIGHTS = "Insights" + DYNAMIC_INSIGHT = "DynamicInsight" + MARKDOWN = "Markdown" + DETECTOR = "Detector" + DROP_DOWN = "DropDown" + CARD = "Card" + SOLUTION = "Solution" + GUAGE = "Guage" + FORM = "Form" + CHANGE_SETS = "ChangeSets" + CHANGE_ANALYSIS_ONBOARDING = "ChangeAnalysisOnboarding" + CHANGES_VIEW = "ChangesView" + APP_INSIGHT = "AppInsight" + DEPENDENCY_GRAPH = "DependencyGraph" + DOWN_TIME = "DownTime" + SUMMARY_CARD = "SummaryCard" + SEARCH_COMPONENT = "SearchComponent" + APP_INSIGHT_ENABLEMENT = "AppInsightEnablement" + +class ResolveStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + INITIALIZED = "Initialized" + RESOLVED = "Resolved" + INVALID_SYNTAX = "InvalidSyntax" + MSI_NOT_ENABLED = "MSINotEnabled" + VAULT_NOT_FOUND = "VaultNotFound" + SECRET_NOT_FOUND = "SecretNotFound" + SECRET_VERSION_NOT_FOUND = "SecretVersionNotFound" + ACCESS_TO_KEY_VAULT_DENIED = "AccessToKeyVaultDenied" + OTHER_REASONS = "OtherReasons" + FETCH_TIMED_OUT = "FetchTimedOut" + UNAUTHORIZED_CLIENT = "UnauthorizedClient" + +class ResourceScopeType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. + """ + + SERVER_FARM = "ServerFarm" + SUBSCRIPTION = "Subscription" + WEB_SITE = "WebSite" + +class RouteType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of route this is: + DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 + INHERITED - Routes inherited from the real Virtual Network routes + STATIC - Static route set on the app only + + These values will be used for syncing an app's routes with those from a Virtual Network. + """ + + DEFAULT = "DEFAULT" + INHERITED = "INHERITED" + STATIC = "STATIC" + +class ScmType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SCM type. + """ + + NONE = "None" + DROPBOX = "Dropbox" + TFS = "Tfs" + LOCAL_GIT = "LocalGit" + GIT_HUB = "GitHub" + CODE_PLEX_GIT = "CodePlexGit" + CODE_PLEX_HG = "CodePlexHg" + BITBUCKET_GIT = "BitbucketGit" + BITBUCKET_HG = "BitbucketHg" + EXTERNAL_GIT = "ExternalGit" + EXTERNAL_HG = "ExternalHg" + ONE_DRIVE = "OneDrive" + VSO = "VSO" + VSTSRM = "VSTSRM" + +class SiteAvailabilityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Management information availability state for the app. + """ + + NORMAL = "Normal" + LIMITED = "Limited" + DISASTER_RECOVERY_MODE = "DisasterRecoveryMode" + +class SiteExtensionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Site extension type. + """ + + GALLERY = "Gallery" + WEB_ROOT = "WebRoot" + +class SiteLoadBalancing(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Site load balancing. + """ + + WEIGHTED_ROUND_ROBIN = "WeightedRoundRobin" + LEAST_REQUESTS = "LeastRequests" + LEAST_RESPONSE_TIME = "LeastResponseTime" + WEIGHTED_TOTAL_TRAFFIC = "WeightedTotalTraffic" + REQUEST_HASH = "RequestHash" + PER_SITE_ROUND_ROBIN = "PerSiteRoundRobin" + +class SiteRuntimeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + READY = "READY" + STOPPED = "STOPPED" + UNKNOWN = "UNKNOWN" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + FREE = "Free" + SHARED = "Shared" + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + DYNAMIC = "Dynamic" + ISOLATED = "Isolated" + ISOLATED_V2 = "IsolatedV2" + PREMIUM_V2 = "PremiumV2" + PREMIUM_V3 = "PremiumV3" + PREMIUM_CONTAINER = "PremiumContainer" + ELASTIC_PREMIUM = "ElasticPremium" + ELASTIC_ISOLATED = "ElasticIsolated" + +class SolutionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of Solution + """ + + QUICK_SOLUTION = "QuickSolution" + DEEP_INVESTIGATION = "DeepInvestigation" + BEST_PRACTICES = "BestPractices" + +class SslState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SSL type. + """ + + DISABLED = "Disabled" + SNI_ENABLED = "SniEnabled" + IP_BASED_ENABLED = "IpBasedEnabled" + +class StackPreferredOs(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Function App stack preferred OS. + """ + + WINDOWS = "Windows" + LINUX = "Linux" + +class StatusOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """App Service plan status. + """ + + READY = "Ready" + PENDING = "Pending" + CREATING = "Creating" + +class SupportedTlsVersions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """MinTlsVersion: configures the minimum version of TLS required for SSL requests + """ + + ONE0 = "1.0" + ONE1 = "1.1" + ONE2 = "1.2" + +class TriggeredWebJobStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Job status. + """ + + SUCCESS = "Success" + FAILED = "Failed" + ERROR = "Error" + +class TriggerTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The trigger type of the function + """ + + HTTP_TRIGGER = "HttpTrigger" + UNKNOWN = "Unknown" + +class UnauthenticatedClientAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The action to take when an unauthenticated client attempts to access the app. + """ + + REDIRECT_TO_LOGIN_PAGE = "RedirectToLoginPage" + ALLOW_ANONYMOUS = "AllowAnonymous" + +class UnauthenticatedClientActionV2(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + REDIRECT_TO_LOGIN_PAGE = "RedirectToLoginPage" + ALLOW_ANONYMOUS = "AllowAnonymous" + RETURN401 = "Return401" + RETURN403 = "Return403" + +class UsageState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """State indicating whether the app has exceeded its quota usage. Read-only. + """ + + NORMAL = "Normal" + EXCEEDED = "Exceeded" + +class ValidateResourceTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Resource type used for verification. + """ + + SERVER_FARM = "ServerFarm" + SITE = "Site" + MICROSOFT_WEB_HOSTING_ENVIRONMENTS = "Microsoft.Web/hostingEnvironments" + +class WebJobType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Job type. + """ + + CONTINUOUS = "Continuous" + TRIGGERED = "Triggered" + +class WorkerSizeOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of the machines. + """ + + SMALL = "Small" + MEDIUM = "Medium" + LARGE = "Large" + D1 = "D1" + D2 = "D2" + D3 = "D3" + SMALL_V3 = "SmallV3" + MEDIUM_V3 = "MediumV3" + LARGE_V3 = "LargeV3" + NESTED_SMALL = "NestedSmall" + NESTED_SMALL_LINUX = "NestedSmallLinux" + DEFAULT = "Default" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/__init__.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/__init__.py new file mode 100644 index 000000000000..7359a8580a22 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/__init__.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations +from ._certificate_orders_diagnostics_operations import CertificateOrdersDiagnosticsOperations +from ._certificate_registration_provider_operations import CertificateRegistrationProviderOperations +from ._domains_operations import DomainsOperations +from ._top_level_domains_operations import TopLevelDomainsOperations +from ._domain_registration_provider_operations import DomainRegistrationProviderOperations +from ._certificates_operations import CertificatesOperations +from ._deleted_web_apps_operations import DeletedWebAppsOperations +from ._diagnostics_operations import DiagnosticsOperations +from ._global_model_operations import GlobalOperations +from ._provider_operations import ProviderOperations +from ._recommendations_operations import RecommendationsOperations +from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin +from ._web_apps_operations import WebAppsOperations +from ._static_sites_operations import StaticSitesOperations +from ._app_service_environments_operations import AppServiceEnvironmentsOperations +from ._app_service_plans_operations import AppServicePlansOperations +from ._resource_health_metadata_operations import ResourceHealthMetadataOperations + +__all__ = [ + 'AppServiceCertificateOrdersOperations', + 'CertificateOrdersDiagnosticsOperations', + 'CertificateRegistrationProviderOperations', + 'DomainsOperations', + 'TopLevelDomainsOperations', + 'DomainRegistrationProviderOperations', + 'CertificatesOperations', + 'DeletedWebAppsOperations', + 'DiagnosticsOperations', + 'GlobalOperations', + 'ProviderOperations', + 'RecommendationsOperations', + 'WebSiteManagementClientOperationsMixin', + 'WebAppsOperations', + 'StaticSitesOperations', + 'AppServiceEnvironmentsOperations', + 'AppServicePlansOperations', + 'ResourceHealthMetadataOperations', +] diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_certificate_orders_operations.py new file mode 100644 index 000000000000..f7018cda9ca3 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_certificate_orders_operations.py @@ -0,0 +1,1517 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AppServiceCertificateOrdersOperations(object): + """AppServiceCertificateOrdersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AppServiceCertificateOrderCollection"] + """List all certificate orders in a subscription. + + Description for List all certificate orders in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AppServiceCertificateOrderCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + + def validate_purchase_information( + self, + app_service_certificate_order, # type: "_models.AppServiceCertificateOrder" + **kwargs # type: Any + ): + # type: (...) -> None + """Validate information for a certificate order. + + Description for Validate information for a certificate order. + + :param app_service_certificate_order: Information for a certificate order. + :type app_service_certificate_order: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_purchase_information.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AppServiceCertificateOrderCollection"] + """Get certificate orders in a resource group. + + Description for Get certificate orders in a resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AppServiceCertificateOrderCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + + def get( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServiceCertificateOrder" + """Get a certificate order. + + Description for Get a certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order.. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceCertificateOrder, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + certificate_distinguished_name, # type: "_models.AppServiceCertificateOrder" + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServiceCertificateOrder" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + certificate_distinguished_name, # type: "_models.AppServiceCertificateOrder" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AppServiceCertificateOrder"] + """Create or update a certificate purchase order. + + Description for Create or update a certificate purchase order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param certificate_distinguished_name: Distinguished name to use for the certificate order. + :type certificate_distinguished_name: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AppServiceCertificateOrder or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + certificate_order_name=certificate_order_name, + certificate_distinguished_name=certificate_distinguished_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete an existing certificate order. + + Description for Delete an existing certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + certificate_distinguished_name, # type: "_models.AppServiceCertificateOrderPatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServiceCertificateOrder" + """Create or update a certificate purchase order. + + Description for Create or update a certificate purchase order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param certificate_distinguished_name: Distinguished name to use for the certificate order. + :type certificate_distinguished_name: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceCertificateOrder, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + + def list_certificates( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AppServiceCertificateCollection"] + """List all certificates associated with a certificate order. + + Description for List all certificates associated with a certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServiceCertificateCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_certificates.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AppServiceCertificateCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + + def get_certificate( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServiceCertificateResource" + """Get the certificate associated with a certificate order. + + Description for Get the certificate associated with a certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name: Name of the certificate. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceCertificateResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + + def _create_or_update_certificate_initial( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + name, # type: str + key_vault_certificate, # type: "_models.AppServiceCertificateResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServiceCertificateResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_certificate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + + def begin_create_or_update_certificate( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + name, # type: str + key_vault_certificate, # type: "_models.AppServiceCertificateResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AppServiceCertificateResource"] + """Creates or updates a certificate and associates with key vault secret. + + Description for Creates or updates a certificate and associates with key vault secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name: Name of the certificate. + :type name: str + :param key_vault_certificate: Key vault certificate resource Id. + :type key_vault_certificate: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AppServiceCertificateResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_certificate_initial( + resource_group_name=resource_group_name, + certificate_order_name=certificate_order_name, + name=name, + key_vault_certificate=key_vault_certificate, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + + def delete_certificate( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete the certificate associated with a certificate order. + + Description for Delete the certificate associated with a certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name: Name of the certificate. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + + def update_certificate( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + name, # type: str + key_vault_certificate, # type: "_models.AppServiceCertificatePatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServiceCertificateResource" + """Creates or updates a certificate and associates with key vault secret. + + Description for Creates or updates a certificate and associates with key vault secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name: Name of the certificate. + :type name: str + :param key_vault_certificate: Key vault certificate resource Id. + :type key_vault_certificate: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificatePatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceCertificateResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + + def reissue( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + reissue_certificate_order_request, # type: "_models.ReissueCertificateOrderRequest" + **kwargs # type: Any + ): + # type: (...) -> None + """Reissue an existing certificate order. + + Description for Reissue an existing certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param reissue_certificate_order_request: Parameters for the reissue. + :type reissue_certificate_order_request: ~azure.mgmt.web.v2020_12_01.models.ReissueCertificateOrderRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.reissue.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + + def renew( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + renew_certificate_order_request, # type: "_models.RenewCertificateOrderRequest" + **kwargs # type: Any + ): + # type: (...) -> None + """Renew an existing certificate order. + + Description for Renew an existing certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param renew_certificate_order_request: Renew parameters. + :type renew_certificate_order_request: ~azure.mgmt.web.v2020_12_01.models.RenewCertificateOrderRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.renew.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + + def resend_email( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Resend certificate email. + + Description for Resend certificate email. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.resend_email.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + + def resend_request_emails( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + name_identifier, # type: "_models.NameIdentifier" + **kwargs # type: Any + ): + # type: (...) -> None + """Verify domain ownership for this certificate order. + + Description for Verify domain ownership for this certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name_identifier: Email address. + :type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.resend_request_emails.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + + def retrieve_site_seal( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + site_seal_request, # type: "_models.SiteSealRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteSeal" + """Verify domain ownership for this certificate order. + + Description for Verify domain ownership for this certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param site_seal_request: Site seal request. + :type site_seal_request: ~azure.mgmt.web.v2020_12_01.models.SiteSealRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteSeal, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSeal + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSeal"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.retrieve_site_seal.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_seal_request, 'SiteSealRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteSeal', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + + def verify_domain_ownership( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Verify domain ownership for this certificate order. + + Description for Verify domain ownership for this certificate order. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.verify_domain_ownership.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + + def retrieve_certificate_actions( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.CertificateOrderAction"] + """Retrieve the list of certificate actions. + + Description for Retrieve the list of certificate actions. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate order. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of CertificateOrderAction, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.CertificateOrderAction] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.CertificateOrderAction"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.retrieve_certificate_actions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[CertificateOrderAction]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + + def retrieve_certificate_email_history( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.CertificateEmail"] + """Retrieve email history. + + Description for Retrieve email history. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate order. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of CertificateEmail, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.CertificateEmail] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.CertificateEmail"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.retrieve_certificate_email_history.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[CertificateEmail]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_environments_operations.py new file mode 100644 index 000000000000..18702261131f --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_environments_operations.py @@ -0,0 +1,3904 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AppServiceEnvironmentsOperations(object): + """AppServiceEnvironmentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AppServiceEnvironmentCollection"] + """Get all App Service Environments for a subscription. + + Description for Get all App Service Environments for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AppServiceEnvironmentCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AppServiceEnvironmentCollection"] + """Get all App Service Environments in a resource group. + + Description for Get all App Service Environments in a resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AppServiceEnvironmentCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + + def get( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServiceEnvironmentResource" + """Get the properties of an App Service Environment. + + Description for Get the properties of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceEnvironmentResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + name, # type: str + hosting_environment_envelope, # type: "_models.AppServiceEnvironmentResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServiceEnvironmentResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + name, # type: str + hosting_environment_envelope, # type: "_models.AppServiceEnvironmentResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AppServiceEnvironmentResource"] + """Create or update an App Service Environment. + + Description for Create or update an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param hosting_environment_envelope: Configuration details of the App Service Environment. + :type hosting_environment_envelope: ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AppServiceEnvironmentResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + hosting_environment_envelope=hosting_environment_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + name, # type: str + force_delete=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query("force_delete", force_delete, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + name, # type: str + force_delete=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete an App Service Environment. + + Description for Delete an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param force_delete: Specify :code:`true` to force the deletion even if the App + Service Environment contains resources. The default is :code:`false`. + :type force_delete: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + name, # type: str + hosting_environment_envelope, # type: "_models.AppServiceEnvironmentPatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServiceEnvironmentResource" + """Create or update an App Service Environment. + + Description for Create or update an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param hosting_environment_envelope: Configuration details of the App Service Environment. + :type hosting_environment_envelope: ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServiceEnvironmentResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + + def list_capacities( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StampCapacityCollection"] + """Get the used, available, and total worker capacity an App Service Environment. + + Description for Get the used, available, and total worker capacity an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StampCapacityCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StampCapacityCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_capacities.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StampCapacityCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + + def get_vip_info( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AddressResponse" + """Get IP addresses assigned to an App Service Environment. + + Description for Get IP addresses assigned to an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AddressResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vip_info.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + + def _change_vnet_initial( + self, + resource_group_name, # type: str + name, # type: str + vnet_info, # type: "_models.VirtualNetworkProfile" + **kwargs # type: Any + ): + # type: (...) -> "_models.WebAppCollection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._change_vnet_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + + def begin_change_vnet( + self, + resource_group_name, # type: str + name, # type: str + vnet_info, # type: "_models.VirtualNetworkProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[ItemPaged["_models.WebAppCollection"]] + """Move an App Service Environment to a different VNET. + + Description for Move an App Service Environment to a different VNET. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param vnet_info: Details for the new virtual network. + :type vnet_info: ~azure.mgmt.web.v2020_12_01.models.VirtualNetworkProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.change_vnet.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._change_vnet_initial( + resource_group_name=resource_group_name, + name=name, + vnet_info=vnet_info, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + def get_long_running_output(pipeline_response): + def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + else: + return get_next(next_link) + + return ItemPaged( + internal_get_next, extract_data + ) + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + + def get_ase_v3_networking_configuration( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AseV3NetworkingConfiguration" + """Get networking configuration of an App Service Environment. + + Description for Get networking configuration of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AseV3NetworkingConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AseV3NetworkingConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AseV3NetworkingConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ase_v3_networking_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AseV3NetworkingConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + + def update_ase_networking_configuration( + self, + resource_group_name, # type: str + name, # type: str + ase_networking_configuration, # type: "_models.AseV3NetworkingConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.AseV3NetworkingConfiguration" + """Update networking configuration of an App Service Environment. + + Description for Update networking configuration of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param ase_networking_configuration: + :type ase_networking_configuration: ~azure.mgmt.web.v2020_12_01.models.AseV3NetworkingConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AseV3NetworkingConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AseV3NetworkingConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AseV3NetworkingConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_ase_networking_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AseV3NetworkingConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + + def list_diagnostics( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.HostingEnvironmentDiagnostics"] + """Get diagnostic information for an App Service Environment. + + Description for Get diagnostic information for an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of HostingEnvironmentDiagnostics, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentDiagnostics] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.HostingEnvironmentDiagnostics"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_diagnostics.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[HostingEnvironmentDiagnostics]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + + def get_diagnostics_item( + self, + resource_group_name, # type: str + name, # type: str + diagnostics_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HostingEnvironmentDiagnostics" + """Get a diagnostics item for an App Service Environment. + + Description for Get a diagnostics item for an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param diagnostics_name: Name of the diagnostics item. + :type diagnostics_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostingEnvironmentDiagnostics, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostingEnvironmentDiagnostics + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostingEnvironmentDiagnostics"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_diagnostics_item.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'diagnosticsName': self._serialize.url("diagnostics_name", diagnostics_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostingEnvironmentDiagnostics', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + + def get_inbound_network_dependencies_endpoints( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.InboundEnvironmentEndpointCollection"] + """Get the network endpoints of all inbound dependencies of an App Service Environment. + + Description for Get the network endpoints of all inbound dependencies of an App Service + Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either InboundEnvironmentEndpointCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.InboundEnvironmentEndpointCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_inbound_network_dependencies_endpoints.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('InboundEnvironmentEndpointCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + + def list_multi_role_pools( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WorkerPoolCollection"] + """Get all multi-role pools. + + Description for Get all multi-role pools. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkerPoolCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_multi_role_pools.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WorkerPoolCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + + def get_multi_role_pool( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WorkerPoolResource" + """Get properties of a multi-role pool. + + Description for Get properties of a multi-role pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkerPoolResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_multi_role_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + + def _create_or_update_multi_role_pool_initial( + self, + resource_group_name, # type: str + name, # type: str + multi_role_pool_envelope, # type: "_models.WorkerPoolResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.WorkerPoolResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_multi_role_pool_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + + def begin_create_or_update_multi_role_pool( + self, + resource_group_name, # type: str + name, # type: str + multi_role_pool_envelope, # type: "_models.WorkerPoolResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.WorkerPoolResource"] + """Create or update a multi-role pool. + + Description for Create or update a multi-role pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param multi_role_pool_envelope: Properties of the multi-role pool. + :type multi_role_pool_envelope: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_multi_role_pool_initial( + resource_group_name=resource_group_name, + name=name, + multi_role_pool_envelope=multi_role_pool_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + + def update_multi_role_pool( + self, + resource_group_name, # type: str + name, # type: str + multi_role_pool_envelope, # type: "_models.WorkerPoolResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.WorkerPoolResource" + """Create or update a multi-role pool. + + Description for Create or update a multi-role pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param multi_role_pool_envelope: Properties of the multi-role pool. + :type multi_role_pool_envelope: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkerPoolResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_multi_role_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + + def list_multi_role_pool_instance_metric_definitions( + self, + resource_group_name, # type: str + name, # type: str + instance, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceMetricDefinitionCollection"] + """Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + + Description for Get metric definitions for a specific instance of a multi-role pool of an App + Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param instance: Name of the instance in the multi-role pool. + :type instance: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceMetricDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_multi_role_pool_instance_metric_definitions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instance': self._serialize.url("instance", instance, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceMetricDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + + def list_multi_role_metric_definitions( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceMetricDefinitionCollection"] + """Get metric definitions for a multi-role pool of an App Service Environment. + + Description for Get metric definitions for a multi-role pool of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceMetricDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_multi_role_metric_definitions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceMetricDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + + def list_multi_role_pool_skus( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SkuInfoCollection"] + """Get available SKUs for scaling a multi-role pool. + + Description for Get available SKUs for scaling a multi-role pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SkuInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_multi_role_pool_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SkuInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + + def list_multi_role_usages( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.UsageCollection"] + """Get usage metrics for a multi-role pool of an App Service Environment. + + Description for Get usage metrics for a multi-role pool of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UsageCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.UsageCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_multi_role_usages.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('UsageCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + + def list_operations( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.Operation"] + """List all currently running operations on the App Service Environment. + + Description for List all currently running operations on the App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of Operation, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.Operation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.Operation"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_operations.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[Operation]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + + def get_outbound_network_dependencies_endpoints( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OutboundEnvironmentEndpointCollection"] + """Get the network endpoints of all outbound dependencies of an App Service Environment. + + Description for Get the network endpoints of all outbound dependencies of an App Service + Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundEnvironmentEndpointCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.OutboundEnvironmentEndpointCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_outbound_network_dependencies_endpoints.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OutboundEnvironmentEndpointCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + + def get_private_endpoint_connection_list( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionCollection"] + """Gets the list of private endpoints associated with a hosting environment. + + Description for Gets the list of private endpoints associated with a hosting environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} # type: ignore + + def get_private_endpoint_connection( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RemotePrivateEndpointConnectionARMResource" + """Gets a private endpoint connection. + + Description for Gets a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RemotePrivateEndpointConnectionARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _approve_or_reject_private_endpoint_connection_initial( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_wrapper, # type: "_models.PrivateLinkConnectionApprovalRequestResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.RemotePrivateEndpointConnectionARMResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._approve_or_reject_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_approve_or_reject_private_endpoint_connection( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_wrapper, # type: "_models.PrivateLinkConnectionApprovalRequestResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"] + """Approves or rejects a private endpoint connection. + + Description for Approves or rejects a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param private_endpoint_wrapper: + :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionApprovalRequestResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either RemotePrivateEndpointConnectionARMResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._approve_or_reject_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_wrapper=private_endpoint_wrapper, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_private_endpoint_connection_initial( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> object + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 204: + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete_private_endpoint_connection( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[object] + """Deletes a private endpoint connection. + + Description for Deletes a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either object or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[object] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[object] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def get_private_link_resources( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesWrapper" + """Gets the private link resources. + + Description for Gets the private link resources. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesWrapper, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesWrapper"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_link_resources.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} # type: ignore + + def reboot( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Reboot all machines in an App Service Environment. + + Description for Reboot all machines in an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reboot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + + def _resume_initial( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WebAppCollection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._resume_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + + def begin_resume( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[ItemPaged["_models.WebAppCollection"]] + """Resume an App Service Environment. + + Description for Resume an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.resume.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._resume_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + def get_long_running_output(pipeline_response): + def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + else: + return get_next(next_link) + + return ItemPaged( + internal_get_next, extract_data + ) + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + + def list_app_service_plans( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AppServicePlanCollection"] + """Get all App Service plans in an App Service Environment. + + Description for Get all App Service plans in an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServicePlanCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_app_service_plans.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AppServicePlanCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + + def list_web_apps( + self, + resource_group_name, # type: str + name, # type: str + properties_to_include=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebAppCollection"] + """Get all apps in an App Service Environment. + + Description for Get all apps in an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param properties_to_include: Comma separated list of app properties to include. + :type properties_to_include: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if properties_to_include is not None: + query_parameters['propertiesToInclude'] = self._serialize.query("properties_to_include", properties_to_include, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + + def _suspend_initial( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WebAppCollection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._suspend_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + + def begin_suspend( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[ItemPaged["_models.WebAppCollection"]] + """Suspend an App Service Environment. + + Description for Suspend an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.suspend.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._suspend_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + def get_long_running_output(pipeline_response): + def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + else: + return get_next(next_link) + + return ItemPaged( + internal_get_next, extract_data + ) + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + + def list_usages( + self, + resource_group_name, # type: str + name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CsmUsageQuotaCollection"] + """Get global usage metrics of an App Service Environment. + + Description for Get global usage metrics of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param filter: Return only usages/metrics specified in the filter. Filter conforms to odata + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq + 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + duration'[Hour|Minute|Day]'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmUsageQuotaCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CsmUsageQuotaCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + + def list_worker_pools( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WorkerPoolCollection"] + """Get all worker pools of an App Service Environment. + + Description for Get all worker pools of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkerPoolCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_worker_pools.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WorkerPoolCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + + def get_worker_pool( + self, + resource_group_name, # type: str + name, # type: str + worker_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WorkerPoolResource" + """Get properties of a worker pool. + + Description for Get properties of a worker pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkerPoolResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_worker_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + + def _create_or_update_worker_pool_initial( + self, + resource_group_name, # type: str + name, # type: str + worker_pool_name, # type: str + worker_pool_envelope, # type: "_models.WorkerPoolResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.WorkerPoolResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_worker_pool_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + + def begin_create_or_update_worker_pool( + self, + resource_group_name, # type: str + name, # type: str + worker_pool_name, # type: str + worker_pool_envelope, # type: "_models.WorkerPoolResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.WorkerPoolResource"] + """Create or update a worker pool. + + Description for Create or update a worker pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :param worker_pool_envelope: Properties of the worker pool. + :type worker_pool_envelope: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either WorkerPoolResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_worker_pool_initial( + resource_group_name=resource_group_name, + name=name, + worker_pool_name=worker_pool_name, + worker_pool_envelope=worker_pool_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + + def update_worker_pool( + self, + resource_group_name, # type: str + name, # type: str + worker_pool_name, # type: str + worker_pool_envelope, # type: "_models.WorkerPoolResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.WorkerPoolResource" + """Create or update a worker pool. + + Description for Create or update a worker pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :param worker_pool_envelope: Properties of the worker pool. + :type worker_pool_envelope: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkerPoolResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_worker_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + + def list_worker_pool_instance_metric_definitions( + self, + resource_group_name, # type: str + name, # type: str + worker_pool_name, # type: str + instance, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceMetricDefinitionCollection"] + """Get metric definitions for a specific instance of a worker pool of an App Service Environment. + + Description for Get metric definitions for a specific instance of a worker pool of an App + Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :param instance: Name of the instance in the worker pool. + :type instance: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceMetricDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_worker_pool_instance_metric_definitions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'instance': self._serialize.url("instance", instance, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceMetricDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + + def list_web_worker_metric_definitions( + self, + resource_group_name, # type: str + name, # type: str + worker_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceMetricDefinitionCollection"] + """Get metric definitions for a worker pool of an App Service Environment. + + Description for Get metric definitions for a worker pool of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceMetricDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_worker_metric_definitions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceMetricDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + + def list_worker_pool_skus( + self, + resource_group_name, # type: str + name, # type: str + worker_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SkuInfoCollection"] + """Get available SKUs for scaling a worker pool. + + Description for Get available SKUs for scaling a worker pool. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SkuInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_worker_pool_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SkuInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + + def list_web_worker_usages( + self, + resource_group_name, # type: str + name, # type: str + worker_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.UsageCollection"] + """Get usage metrics for a worker pool of an App Service Environment. + + Description for Get usage metrics for a worker pool of an App Service Environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UsageCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.UsageCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_worker_usages.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('UsageCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py new file mode 100644 index 000000000000..cf9c3f4c485d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py @@ -0,0 +1,2039 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AppServicePlansOperations(object): + """AppServicePlansOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + detailed=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AppServicePlanCollection"] + """Get all App Service plans for a subscription. + + Description for Get all App Service plans for a subscription. + + :param detailed: Specify :code:`true` to return all App Service plan properties. + The default is :code:`false`, which returns a subset of the properties. + Retrieval of all properties may increase the API latency. + :type detailed: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServicePlanCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if detailed is not None: + query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AppServicePlanCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AppServicePlanCollection"] + """Get all App Service plans in a resource group. + + Description for Get all App Service plans in a resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AppServicePlanCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AppServicePlanCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + + def get( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.AppServicePlan"] + """Get an App Service plan. + + Description for Get an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServicePlan, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServicePlan or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AppServicePlan"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + name, # type: str + app_service_plan, # type: "_models.AppServicePlan" + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServicePlan" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_service_plan, 'AppServicePlan') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + name, # type: str + app_service_plan, # type: "_models.AppServicePlan" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AppServicePlan"] + """Creates or updates an App Service Plan. + + Description for Creates or updates an App Service Plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param app_service_plan: Details of the App Service plan. + :type app_service_plan: ~azure.mgmt.web.v2020_12_01.models.AppServicePlan + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AppServicePlan or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + app_service_plan=app_service_plan, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete an App Service plan. + + Description for Delete an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + name, # type: str + app_service_plan, # type: "_models.AppServicePlanPatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AppServicePlan" + """Creates or updates an App Service Plan. + + Description for Creates or updates an App Service Plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param app_service_plan: Details of the App Service plan. + :type app_service_plan: ~azure.mgmt.web.v2020_12_01.models.AppServicePlanPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppServicePlan, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppServicePlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + + def list_capabilities( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.Capability"] + """List all capabilities of an App Service plan. + + Description for List all capabilities of an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of Capability, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.Capability] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.Capability"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_capabilities.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[Capability]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + + def get_hybrid_connection( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnection" + """Retrieve a Hybrid Connection in use in an App Service plan. + + Description for Retrieve a Hybrid Connection in use in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param namespace_name: Name of the Service Bus namespace. + :type namespace_name: str + :param relay_name: Name of the Service Bus relay. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + def delete_hybrid_connection( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a Hybrid Connection in use in an App Service plan. + + Description for Delete a Hybrid Connection in use in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param namespace_name: Name of the Service Bus namespace. + :type namespace_name: str + :param relay_name: Name of the Service Bus relay. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + def list_hybrid_connection_keys( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnectionKey" + """Get the send key name and value of a Hybrid Connection. + + Description for Get the send key name and value of a Hybrid Connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param namespace_name: The name of the Service Bus namespace. + :type namespace_name: str + :param relay_name: The name of the Service Bus relay. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnectionKey, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnectionKey + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionKey"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_hybrid_connection_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnectionKey', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + + def list_web_apps_by_hybrid_connection( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceCollection"] + """Get all apps that use a Hybrid Connection in an App Service Plan. + + Description for Get all apps that use a Hybrid Connection in an App Service Plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param namespace_name: Name of the Hybrid Connection namespace. + :type namespace_name: str + :param relay_name: Name of the Hybrid Connection relay. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_apps_by_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + + def get_hybrid_connection_plan_limit( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnectionLimits" + """Get the maximum number of Hybrid Connections allowed in an App Service plan. + + Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnectionLimits, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnectionLimits + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionLimits"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_hybrid_connection_plan_limit.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnectionLimits', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + + def list_hybrid_connections( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.HybridConnectionCollection"] + """Retrieve all Hybrid Connections in use in an App Service plan. + + Description for Retrieve all Hybrid Connections in use in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HybridConnectionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.HybridConnectionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_hybrid_connections.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('HybridConnectionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + + def restart_web_apps( + self, + resource_group_name, # type: str + name, # type: str + soft_restart=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Restart all apps in an App Service plan. + + Description for Restart all apps in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param soft_restart: Specify :code:`true` to perform a soft restart, applies the + configuration settings and restarts the apps if necessary. The default is + :code:`false`, which always restarts and reprovisions the apps. + :type soft_restart: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.restart_web_apps.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + + def list_web_apps( + self, + resource_group_name, # type: str + name, # type: str + skip_token=None, # type: Optional[str] + filter=None, # type: Optional[str] + top=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebAppCollection"] + """Get all apps associated with an App Service plan. + + Description for Get all apps associated with an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param skip_token: Skip to a web app in the list of webapps associated with app service plan. + If specified, the resulting list will contain web apps starting from (including) the skipToken. + Otherwise, the resulting list contains web apps from the start of the list. + :type skip_token: str + :param filter: Supported filter: $filter=state eq running. Returns only web apps that are + currently running. + :type filter: str + :param top: List page size. If specified, results are paged. + :type top: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_apps.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + + def get_server_farm_skus( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> object + """Gets all selectable SKUs for a given App Service Plan. + + Description for Gets all selectable SKUs for a given App Service Plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of App Service Plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: object, or the result of cls(response) + :rtype: object + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_server_farm_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + + def list_usages( + self, + resource_group_name, # type: str + name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CsmUsageQuotaCollection"] + """Gets server farm usage information. + + Description for Gets server farm usage information. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of App Service Plan. + :type name: str + :param filter: Return only usages/metrics specified in the filter. Filter conforms to odata + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmUsageQuotaCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CsmUsageQuotaCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + + def list_vnets( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.VnetInfo"] + """Get all Virtual Networks associated with an App Service plan. + + Description for Get all Virtual Networks associated with an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of VnetInfo, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.VnetInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_vnets.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[VnetInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + + def get_vnet_from_server_farm( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VnetInfo"] + """Get a Virtual Network associated with an App Service plan. + + Description for Get a Virtual Network associated with an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VnetInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_from_server_farm.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + + def get_vnet_gateway( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetGateway" + """Get a Virtual Network gateway. + + Description for Get a Virtual Network gateway. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Only the 'primary' gateway is supported. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + def update_vnet_gateway( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + gateway_name, # type: str + connection_envelope, # type: "_models.VnetGateway" + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetGateway" + """Update a Virtual Network gateway. + + Description for Update a Virtual Network gateway. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Only the 'primary' gateway is supported. + :type gateway_name: str + :param connection_envelope: Definition of the gateway. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + def list_routes_for_vnet( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.VnetRoute"] + """Get all routes that are associated with a Virtual Network in an App Service plan. + + Description for Get all routes that are associated with a Virtual Network in an App Service + plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of VnetRoute, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetRoute] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.VnetRoute"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_routes_for_vnet.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[VnetRoute]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + + def get_route_for_vnet( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + route_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional[List["_models.VnetRoute"]] + """Get a Virtual Network route in an App Service plan. + + Description for Get a Virtual Network route in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param route_name: Name of the Virtual Network route. + :type route_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of VnetRoute, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetRoute] or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.VnetRoute"]]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_route_for_vnet.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[VnetRoute]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + + def create_or_update_vnet_route( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + route_name, # type: str + route, # type: "_models.VnetRoute" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VnetRoute"] + """Create or update a Virtual Network route in an App Service plan. + + Description for Create or update a Virtual Network route in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param route_name: Name of the Virtual Network route. + :type route_name: str + :param route: Definition of the Virtual Network route. + :type route: ~azure.mgmt.web.v2020_12_01.models.VnetRoute + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetRoute, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetRoute or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VnetRoute"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_vnet_route.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(route, 'VnetRoute') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 400, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + + def delete_vnet_route( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + route_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a Virtual Network route in an App Service plan. + + Description for Delete a Virtual Network route in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param route_name: Name of the Virtual Network route. + :type route_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_vnet_route.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + + def update_vnet_route( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + route_name, # type: str + route, # type: "_models.VnetRoute" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VnetRoute"] + """Create or update a Virtual Network route in an App Service plan. + + Description for Create or update a Virtual Network route in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param route_name: Name of the Virtual Network route. + :type route_name: str + :param route: Definition of the Virtual Network route. + :type route: ~azure.mgmt.web.v2020_12_01.models.VnetRoute + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetRoute, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetRoute or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VnetRoute"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_route.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(route, 'VnetRoute') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 400, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetRoute', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + + def reboot_worker( + self, + resource_group_name, # type: str + name, # type: str + worker_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Reboot a worker machine in an App Service plan. + + Description for Reboot a worker machine in an App Service plan. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the App Service plan. + :type name: str + :param worker_name: Name of worker machine, which typically starts with RD. + :type worker_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reboot_worker.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'workerName': self._serialize.url("worker_name", worker_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py new file mode 100644 index 000000000000..2feb58612eaa --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py @@ -0,0 +1,207 @@ +# 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 datetime +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class CertificateOrdersDiagnosticsOperations(object): + """CertificateOrdersDiagnosticsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_app_service_certificate_order_detector_response( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DetectorResponseCollection"] + """Microsoft.CertificateRegistration to get the list of detectors for this RP. + + Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: The certificate order name for which the response is needed. + :type certificate_order_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DetectorResponseCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_app_service_certificate_order_detector_response.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DetectorResponseCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} # type: ignore + + def get_app_service_certificate_order_detector_response( + self, + resource_group_name, # type: str + certificate_order_name, # type: str + detector_name, # type: str + start_time=None, # type: Optional[datetime.datetime] + end_time=None, # type: Optional[datetime.datetime] + time_grain=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.DetectorResponse" + """Microsoft.CertificateRegistration call to get a detector response from App Lens. + + Description for Microsoft.CertificateRegistration call to get a detector response from App + Lens. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param certificate_order_name: The certificate order name for which the response is needed. + :type certificate_order_name: str + :param detector_name: The detector name which needs to be run. + :type detector_name: str + :param start_time: The start time for detector response. + :type start_time: ~datetime.datetime + :param end_time: The end time for the detector response. + :type end_time: ~datetime.datetime + :param time_grain: The time grain for the detector response. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_app_service_certificate_order_detector_response.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_registration_provider_operations.py new file mode 100644 index 000000000000..cb420f144d17 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_registration_provider_operations.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class CertificateRegistrationProviderOperations(object): + """CertificateRegistrationProviderOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_operations( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CsmOperationCollection"] + """Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + + Description for Implements Csm operations Api to exposes the list of available Csm Apis under + the resource provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmOperationCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CsmOperationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificates_operations.py new file mode 100644 index 000000000000..89ac8f4269be --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificates_operations.py @@ -0,0 +1,457 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class CertificatesOperations(object): + """CertificatesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CertificateCollection"] + """Get all certificates for a subscription. + + Description for Get all certificates for a subscription. + + :param filter: Return only information specified in the filter (using OData syntax). For + example: $filter=KeyVaultId eq 'KeyVaultId'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CertificateCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CertificateCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CertificateCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CertificateCollection"] + """Get all certificates in a resource group. + + Description for Get all certificates in a resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CertificateCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CertificateCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CertificateCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + + def get( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Certificate" + """Get a certificate. + + Description for Get a certificate. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Certificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Certificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + name, # type: str + certificate_envelope, # type: "_models.Certificate" + **kwargs # type: Any + ): + # type: (...) -> "_models.Certificate" + """Create or update a certificate. + + Description for Create or update a certificate. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate. + :type name: str + :param certificate_envelope: Details of certificate, if it exists already. + :type certificate_envelope: ~azure.mgmt.web.v2020_12_01.models.Certificate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Certificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(certificate_envelope, 'Certificate') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Certificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a certificate. + + Description for Delete a certificate. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + name, # type: str + certificate_envelope, # type: "_models.CertificatePatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.Certificate" + """Create or update a certificate. + + Description for Create or update a certificate. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the certificate. + :type name: str + :param certificate_envelope: Details of certificate, if it exists already. + :type certificate_envelope: ~azure.mgmt.web.v2020_12_01.models.CertificatePatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Certificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Certificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Certificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_deleted_web_apps_operations.py new file mode 100644 index 000000000000..b2e5cfe97435 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_deleted_web_apps_operations.py @@ -0,0 +1,252 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DeletedWebAppsOperations(object): + """DeletedWebAppsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DeletedWebAppCollection"] + """Get all deleted apps for a subscription. + + Description for Get all deleted apps for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeletedWebAppCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DeletedWebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DeletedWebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + + def list_by_location( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DeletedWebAppCollection"] + """Get all deleted apps for a subscription at location. + + Description for Get all deleted apps for a subscription at location. + + :param location: + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeletedWebAppCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DeletedWebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DeletedWebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + + def get_deleted_web_app_by_location( + self, + location, # type: str + deleted_site_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DeletedSite" + """Get deleted app for a subscription at location. + + Description for Get deleted app for a subscription at location. + + :param location: + :type location: str + :param deleted_site_id: The numeric ID of the deleted app, e.g. 12345. + :type deleted_site_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeletedSite, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeletedSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_deleted_web_app_by_location.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'deletedSiteId': self._serialize.url("deleted_site_id", deleted_site_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeletedSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_diagnostics_operations.py new file mode 100644 index 000000000000..c019733df64f --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_diagnostics_operations.py @@ -0,0 +1,1800 @@ +# 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 datetime +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DiagnosticsOperations(object): + """DiagnosticsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_hosting_environment_detector_responses( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DetectorResponseCollection"] + """List Hosting Environment Detector Responses. + + Description for List Hosting Environment Detector Responses. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site Name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DetectorResponseCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_hosting_environment_detector_responses.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DetectorResponseCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + + def get_hosting_environment_detector_response( + self, + resource_group_name, # type: str + name, # type: str + detector_name, # type: str + start_time=None, # type: Optional[datetime.datetime] + end_time=None, # type: Optional[datetime.datetime] + time_grain=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.DetectorResponse" + """Get Hosting Environment Detector Response. + + Description for Get Hosting Environment Detector Response. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: App Service Environment Name. + :type name: str + :param detector_name: Detector Resource Name. + :type detector_name: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_hosting_environment_detector_response.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + + def list_site_detector_responses( + self, + resource_group_name, # type: str + site_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DetectorResponseCollection"] + """List Site Detector Responses. + + Description for List Site Detector Responses. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DetectorResponseCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_detector_responses.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DetectorResponseCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + + def get_site_detector_response( + self, + resource_group_name, # type: str + site_name, # type: str + detector_name, # type: str + start_time=None, # type: Optional[datetime.datetime] + end_time=None, # type: Optional[datetime.datetime] + time_grain=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.DetectorResponse" + """Get site detector response. + + Description for Get site detector response. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param detector_name: Detector Resource Name. + :type detector_name: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_detector_response.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + + def list_site_diagnostic_categories( + self, + resource_group_name, # type: str + site_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DiagnosticCategoryCollection"] + """Get Diagnostics Categories. + + Description for Get Diagnostics Categories. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticCategoryCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticCategoryCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + + def get_site_diagnostic_category( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DiagnosticCategory" + """Get Diagnostics Category. + + Description for Get Diagnostics Category. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticCategory, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_diagnostic_category.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticCategory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + + def list_site_analyses( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DiagnosticAnalysisCollection"] + """Get Site Analyses. + + Description for Get Site Analyses. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticAnalysisCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysisCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_analyses.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticAnalysisCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + + def get_site_analysis( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + analysis_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AnalysisDefinition" + """Get Site Analysis. + + Description for Get Site Analysis. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param analysis_name: Analysis Name. + :type analysis_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AnalysisDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalysisDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_analysis.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AnalysisDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + + def execute_site_analysis( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + analysis_name, # type: str + start_time=None, # type: Optional[datetime.datetime] + end_time=None, # type: Optional[datetime.datetime] + time_grain=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.DiagnosticAnalysis" + """Execute Analysis. + + Description for Execute Analysis. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Category Name. + :type diagnostic_category: str + :param analysis_name: Analysis Resource Name. + :type analysis_name: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticAnalysis, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysis + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysis"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.execute_site_analysis.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + + def list_site_detectors( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DiagnosticDetectorCollection"] + """Get Detectors. + + Description for Get Detectors. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticDetectorCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_detectors.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticDetectorCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + + def get_site_detector( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + detector_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DetectorDefinition" + """Get Detector. + + Description for Get Detector. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param detector_name: Detector Name. + :type detector_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_detector.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + + def execute_site_detector( + self, + resource_group_name, # type: str + site_name, # type: str + detector_name, # type: str + diagnostic_category, # type: str + start_time=None, # type: Optional[datetime.datetime] + end_time=None, # type: Optional[datetime.datetime] + time_grain=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.DiagnosticDetectorResponse" + """Execute Detector. + + Description for Execute Detector. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param detector_name: Detector Resource Name. + :type detector_name: str + :param diagnostic_category: Category Name. + :type diagnostic_category: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticDetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.execute_site_detector.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + + def list_site_detector_responses_slot( + self, + resource_group_name, # type: str + site_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DetectorResponseCollection"] + """List Site Detector Responses. + + Description for List Site Detector Responses. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DetectorResponseCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_detector_responses_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DetectorResponseCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + + def get_site_detector_response_slot( + self, + resource_group_name, # type: str + site_name, # type: str + detector_name, # type: str + slot, # type: str + start_time=None, # type: Optional[datetime.datetime] + end_time=None, # type: Optional[datetime.datetime] + time_grain=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.DetectorResponse" + """Get site detector response. + + Description for Get site detector response. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param detector_name: Detector Resource Name. + :type detector_name: str + :param slot: Slot Name. + :type slot: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_detector_response_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + + def list_site_diagnostic_categories_slot( + self, + resource_group_name, # type: str + site_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DiagnosticCategoryCollection"] + """Get Diagnostics Categories. + + Description for Get Diagnostics Categories. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticCategoryCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_diagnostic_categories_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticCategoryCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + + def get_site_diagnostic_category_slot( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DiagnosticCategory" + """Get Diagnostics Category. + + Description for Get Diagnostics Category. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticCategory, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticCategory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_diagnostic_category_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticCategory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + + def list_site_analyses_slot( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DiagnosticAnalysisCollection"] + """Get Site Analyses. + + Description for Get Site Analyses. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticAnalysisCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysisCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_analyses_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticAnalysisCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + + def get_site_analysis_slot( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + analysis_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AnalysisDefinition" + """Get Site Analysis. + + Description for Get Site Analysis. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param analysis_name: Analysis Name. + :type analysis_name: str + :param slot: Slot - optional. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AnalysisDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AnalysisDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalysisDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_analysis_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AnalysisDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + + def execute_site_analysis_slot( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + analysis_name, # type: str + slot, # type: str + start_time=None, # type: Optional[datetime.datetime] + end_time=None, # type: Optional[datetime.datetime] + time_grain=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.DiagnosticAnalysis" + """Execute Analysis. + + Description for Execute Analysis. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Category Name. + :type diagnostic_category: str + :param analysis_name: Analysis Resource Name. + :type analysis_name: str + :param slot: Slot Name. + :type slot: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticAnalysis, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysis + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysis"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.execute_site_analysis_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticAnalysis', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + + def list_site_detectors_slot( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DiagnosticDetectorCollection"] + """Get Detectors. + + Description for Get Detectors. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticDetectorCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_detectors_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticDetectorCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + + def get_site_detector_slot( + self, + resource_group_name, # type: str + site_name, # type: str + diagnostic_category, # type: str + detector_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DetectorDefinition" + """Get Detector. + + Description for Get Detector. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param diagnostic_category: Diagnostic Category. + :type diagnostic_category: str + :param detector_name: Detector Name. + :type detector_name: str + :param slot: Slot Name. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DetectorDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DetectorDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_detector_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DetectorDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + + def execute_site_detector_slot( + self, + resource_group_name, # type: str + site_name, # type: str + detector_name, # type: str + diagnostic_category, # type: str + slot, # type: str + start_time=None, # type: Optional[datetime.datetime] + end_time=None, # type: Optional[datetime.datetime] + time_grain=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.DiagnosticDetectorResponse" + """Execute Detector. + + Description for Execute Detector. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site Name. + :type site_name: str + :param detector_name: Detector Resource Name. + :type detector_name: str + :param diagnostic_category: Category Name. + :type diagnostic_category: str + :param slot: Slot Name. + :type slot: str + :param start_time: Start Time. + :type start_time: ~datetime.datetime + :param end_time: End Time. + :type end_time: ~datetime.datetime + :param time_grain: Time Grain. + :type time_grain: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticDetectorResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.execute_site_detector_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticDetectorResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domain_registration_provider_operations.py new file mode 100644 index 000000000000..5936a40b4506 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domain_registration_provider_operations.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DomainRegistrationProviderOperations(object): + """DomainRegistrationProviderOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_operations( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CsmOperationCollection"] + """Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + + Description for Implements Csm operations Api to exposes the list of available Csm Apis under + the resource provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmOperationCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CsmOperationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domains_operations.py new file mode 100644 index 000000000000..db633287c54a --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domains_operations.py @@ -0,0 +1,1139 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DomainsOperations(object): + """DomainsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def check_availability( + self, + identifier, # type: "_models.NameIdentifier" + **kwargs # type: Any + ): + # type: (...) -> "_models.DomainAvailabilityCheckResult" + """Check if a domain is available for registration. + + Description for Check if a domain is available for registration. + + :param identifier: Name of the domain. + :type identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DomainAvailabilityCheckResult, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainAvailabilityCheckResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainAvailabilityCheckResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(identifier, 'NameIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DomainAvailabilityCheckResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DomainCollection"] + """Get all domains in a subscription. + + Description for Get all domains in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DomainCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DomainCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + + def get_control_center_sso_request( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.DomainControlCenterSsoRequest" + """Generate a single sign-on request for the domain management portal. + + Description for Generate a single sign-on request for the domain management portal. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DomainControlCenterSsoRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainControlCenterSsoRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainControlCenterSsoRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_control_center_sso_request.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DomainControlCenterSsoRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + + def list_recommendations( + self, + parameters, # type: "_models.DomainRecommendationSearchParameters" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NameIdentifierCollection"] + """Get domain name recommendations based on keywords. + + Description for Get domain name recommendations based on keywords. + + :param parameters: Search parameters for domain name recommendations. + :type parameters: ~azure.mgmt.web.v2020_12_01.models.DomainRecommendationSearchParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NameIdentifierCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.NameIdentifierCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_recommendations.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DomainRecommendationSearchParameters') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NameIdentifierCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DomainCollection"] + """Get all domains in a resource group. + + Description for Get all domains in a resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DomainCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DomainCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + + def get( + self, + resource_group_name, # type: str + domain_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Domain" + """Get a domain. + + Description for Get a domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Domain, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Domain + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Domain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + domain_name, # type: str + domain, # type: "_models.Domain" + **kwargs # type: Any + ): + # type: (...) -> "_models.Domain" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain, 'Domain') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Domain', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Domain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + domain_name, # type: str + domain, # type: "_models.Domain" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Domain"] + """Creates or updates a domain. + + Description for Creates or updates a domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :param domain: Domain registration information. + :type domain: ~azure.mgmt.web.v2020_12_01.models.Domain + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Domain or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.Domain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain=domain, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Domain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + domain_name, # type: str + force_hard_delete_domain=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a domain. + + Description for Delete a domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :param force_hard_delete_domain: Specify :code:`true` to delete the domain + immediately. The default is :code:`false` which deletes the domain after 24 hours. + :type force_hard_delete_domain: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if force_hard_delete_domain is not None: + query_parameters['forceHardDeleteDomain'] = self._serialize.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + domain_name, # type: str + domain, # type: "_models.DomainPatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.Domain" + """Creates or updates a domain. + + Description for Creates or updates a domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :param domain: Domain registration information. + :type domain: ~azure.mgmt.web.v2020_12_01.models.DomainPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Domain, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Domain + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain, 'DomainPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Domain', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Domain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + + def list_ownership_identifiers( + self, + resource_group_name, # type: str + domain_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DomainOwnershipIdentifierCollection"] + """Lists domain ownership identifiers. + + Description for Lists domain ownership identifiers. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of domain. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DomainOwnershipIdentifierCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifierCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_ownership_identifiers.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DomainOwnershipIdentifierCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + + def get_ownership_identifier( + self, + resource_group_name, # type: str + domain_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DomainOwnershipIdentifier" + """Get ownership identifier for domain. + + Description for Get ownership identifier for domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of domain. + :type domain_name: str + :param name: Name of identifier. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DomainOwnershipIdentifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + + def create_or_update_ownership_identifier( + self, + resource_group_name, # type: str + domain_name, # type: str + name, # type: str + domain_ownership_identifier, # type: "_models.DomainOwnershipIdentifier" + **kwargs # type: Any + ): + # type: (...) -> "_models.DomainOwnershipIdentifier" + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. + + Description for Creates an ownership identifier for a domain or updates identifier details for + an existing identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of domain. + :type domain_name: str + :param name: Name of identifier. + :type name: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DomainOwnershipIdentifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + + def delete_ownership_identifier( + self, + resource_group_name, # type: str + domain_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete ownership identifier for domain. + + Description for Delete ownership identifier for domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of domain. + :type domain_name: str + :param name: Name of identifier. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + + def update_ownership_identifier( + self, + resource_group_name, # type: str + domain_name, # type: str + name, # type: str + domain_ownership_identifier, # type: "_models.DomainOwnershipIdentifier" + **kwargs # type: Any + ): + # type: (...) -> "_models.DomainOwnershipIdentifier" + """Creates an ownership identifier for a domain or updates identifier details for an existing identifier. + + Description for Creates an ownership identifier for a domain or updates identifier details for + an existing identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of domain. + :type domain_name: str + :param name: Name of identifier. + :type name: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DomainOwnershipIdentifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DomainOwnershipIdentifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + + def renew( + self, + resource_group_name, # type: str + domain_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Renew a domain. + + Description for Renew a domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.renew.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_global_model_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_global_model_operations.py new file mode 100644 index 000000000000..e3cfce13b381 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_global_model_operations.py @@ -0,0 +1,220 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class GlobalOperations(object): + """GlobalOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_deleted_web_app( + self, + deleted_site_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DeletedSite" + """Get deleted app for a subscription. + + Description for Get deleted app for a subscription. + + :param deleted_site_id: The numeric ID of the deleted app, e.g. 12345. + :type deleted_site_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeletedSite, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeletedSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_deleted_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'deletedSiteId': self._serialize.url("deleted_site_id", deleted_site_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeletedSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} # type: ignore + + def get_deleted_web_app_snapshots( + self, + deleted_site_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.Snapshot"] + """Get all deleted apps for a subscription. + + Description for Get all deleted apps for a subscription. + + :param deleted_site_id: The numeric ID of the deleted app, e.g. 12345. + :type deleted_site_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of Snapshot, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.Snapshot] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.Snapshot"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_deleted_web_app_snapshots.metadata['url'] # type: ignore + path_format_arguments = { + 'deletedSiteId': self._serialize.url("deleted_site_id", deleted_site_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[Snapshot]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} # type: ignore + + def get_subscription_operation_with_async_response( + self, + location, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Gets an operation in a subscription and given region. + + Description for Gets an operation in a subscription and given region. + + :param location: Location name. + :type location: str + :param operation_id: Operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_subscription_operation_with_async_response.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_provider_operations.py new file mode 100644 index 000000000000..b748c6033a4d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_provider_operations.py @@ -0,0 +1,557 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ProviderOperations(object): + """ProviderOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_available_stacks( + self, + os_type_selected=None, # type: Optional[Union[str, "_models.Enum4"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApplicationStackCollection"] + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their versions. + + :param os_type_selected: + :type os_type_selected: str or ~azure.mgmt.web.v2020_12_01.models.Enum4 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationStackCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_available_stacks.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if os_type_selected is not None: + query_parameters['osTypeSelected'] = self._serialize.query("os_type_selected", os_type_selected, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + + def get_function_app_stacks( + self, + stack_os_type=None, # type: Optional[Union[str, "_models.Enum5"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.FunctionAppStackCollection"] + """Get available Function app frameworks and their versions. + + Description for Get available Function app frameworks and their versions. + + :param stack_os_type: Stack OS Type. + :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum5 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FunctionAppStackCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_function_app_stacks.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if stack_os_type is not None: + query_parameters['stackOsType'] = self._serialize.query("stack_os_type", stack_os_type, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('FunctionAppStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} # type: ignore + + def get_function_app_stacks_for_location( + self, + location, # type: str + stack_os_type=None, # type: Optional[Union[str, "_models.Enum6"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.FunctionAppStackCollection"] + """Get available Function app frameworks and their versions for location. + + Description for Get available Function app frameworks and their versions for location. + + :param location: Function App stack location. + :type location: str + :param stack_os_type: Stack OS Type. + :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum6 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FunctionAppStackCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_function_app_stacks_for_location.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if stack_os_type is not None: + query_parameters['stackOsType'] = self._serialize.query("stack_os_type", stack_os_type, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('FunctionAppStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} # type: ignore + + def get_web_app_stacks_for_location( + self, + location, # type: str + stack_os_type=None, # type: Optional[Union[str, "_models.Enum7"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebAppStackCollection"] + """Get available Web app frameworks and their versions for location. + + Description for Get available Web app frameworks and their versions for location. + + :param location: Web App stack location. + :type location: str + :param stack_os_type: Stack OS Type. + :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum7 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppStackCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_web_app_stacks_for_location.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if stack_os_type is not None: + query_parameters['stackOsType'] = self._serialize.query("stack_os_type", stack_os_type, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} # type: ignore + + def list_operations( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CsmOperationCollection"] + """Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + + Description for Gets all available operations for the Microsoft.Web resource provider. Also + exposes resource metric definitions. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmOperationCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CsmOperationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + + def get_web_app_stacks( + self, + stack_os_type=None, # type: Optional[Union[str, "_models.Enum8"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebAppStackCollection"] + """Get available Web app frameworks and their versions. + + Description for Get available Web app frameworks and their versions. + + :param stack_os_type: Stack OS Type. + :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum8 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppStackCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_web_app_stacks.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if stack_os_type is not None: + query_parameters['stackOsType'] = self._serialize.query("stack_os_type", stack_os_type, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} # type: ignore + + def get_available_stacks_on_prem( + self, + os_type_selected=None, # type: Optional[Union[str, "_models.Enum9"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApplicationStackCollection"] + """Get available application frameworks and their versions. + + Description for Get available application frameworks and their versions. + + :param os_type_selected: + :type os_type_selected: str or ~azure.mgmt.web.v2020_12_01.models.Enum9 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationStackCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_available_stacks_on_prem.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if os_type_selected is not None: + query_parameters['osTypeSelected'] = self._serialize.query("os_type_selected", os_type_selected, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationStackCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_recommendations_operations.py new file mode 100644 index 000000000000..687c1d8d581d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_recommendations_operations.py @@ -0,0 +1,1128 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RecommendationsOperations(object): + """RecommendationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + featured=None, # type: Optional[bool] + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RecommendationCollection"] + """List all recommendations for a subscription. + + Description for List all recommendations for a subscription. + + :param featured: Specify :code:`true` to return only the most critical + recommendations. The default is :code:`false`, which returns all recommendations. + :type featured: bool + :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or + channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecommendationCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if featured is not None: + query_parameters['featured'] = self._serialize.query("featured", featured, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RecommendationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + + def reset_all_filters( + self, + **kwargs # type: Any + ): + # type: (...) -> None + """Reset all recommendation opt-out settings for a subscription. + + Description for Reset all recommendation opt-out settings for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reset_all_filters.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + + def disable_recommendation_for_subscription( + self, + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Disables the specified rule so it will not apply to a subscription in the future. + + Description for Disables the specified rule so it will not apply to a subscription in the + future. + + :param name: Rule name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.disable_recommendation_for_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + + def list_history_for_hosting_environment( + self, + resource_group_name, # type: str + hosting_environment_name, # type: str + expired_only=None, # type: Optional[bool] + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RecommendationCollection"] + """Get past recommendations for an app, optionally specified by the time range. + + Description for Get past recommendations for an app, optionally specified by the time range. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param hosting_environment_name: Name of the hosting environment. + :type hosting_environment_name: str + :param expired_only: Specify :code:`false` to return all recommendations. The + default is :code:`true`, which returns only expired recommendations. + :type expired_only: bool + :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or + channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecommendationCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_history_for_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if expired_only is not None: + query_parameters['expiredOnly'] = self._serialize.query("expired_only", expired_only, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RecommendationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + + def list_recommended_rules_for_hosting_environment( + self, + resource_group_name, # type: str + hosting_environment_name, # type: str + featured=None, # type: Optional[bool] + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RecommendationCollection"] + """Get all recommendations for a hosting environment. + + Description for Get all recommendations for a hosting environment. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param hosting_environment_name: Name of the app. + :type hosting_environment_name: str + :param featured: Specify :code:`true` to return only the most critical + recommendations. The default is :code:`false`, which returns all recommendations. + :type featured: bool + :param filter: Return only channels specified in the filter. Filter is specified by using OData + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecommendationCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if featured is not None: + query_parameters['featured'] = self._serialize.query("featured", featured, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RecommendationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + + def disable_all_for_hosting_environment( + self, + resource_group_name, # type: str + environment_name, # type: str + hosting_environment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Disable all recommendations for an app. + + Description for Disable all recommendations for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param environment_name: Name of the app. + :type environment_name: str + :param hosting_environment_name: + :type hosting_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.disable_all_for_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + + def reset_all_filters_for_hosting_environment( + self, + resource_group_name, # type: str + environment_name, # type: str + hosting_environment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Reset all recommendation opt-out settings for an app. + + Description for Reset all recommendation opt-out settings for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param environment_name: Name of the app. + :type environment_name: str + :param hosting_environment_name: + :type hosting_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reset_all_filters_for_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + + def get_rule_details_by_hosting_environment( + self, + resource_group_name, # type: str + hosting_environment_name, # type: str + name, # type: str + update_seen=None, # type: Optional[bool] + recommendation_id=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.RecommendationRule" + """Get a recommendation rule for an app. + + Description for Get a recommendation rule for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param hosting_environment_name: Name of the hosting environment. + :type hosting_environment_name: str + :param name: Name of the recommendation. + :type name: str + :param update_seen: Specify :code:`true` to update the last-seen timestamp of the + recommendation object. + :type update_seen: bool + :param recommendation_id: The GUID of the recommendation object if you query an expired one. + You don't need to specify it to query an active entry. + :type recommendation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RecommendationRule, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RecommendationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_rule_details_by_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if update_seen is not None: + query_parameters['updateSeen'] = self._serialize.query("update_seen", update_seen, 'bool') + if recommendation_id is not None: + query_parameters['recommendationId'] = self._serialize.query("recommendation_id", recommendation_id, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RecommendationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + + def disable_recommendation_for_hosting_environment( + self, + resource_group_name, # type: str + environment_name, # type: str + name, # type: str + hosting_environment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Disables the specific rule for a web site permanently. + + Description for Disables the specific rule for a web site permanently. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param environment_name: Site name. + :type environment_name: str + :param name: Rule name. + :type name: str + :param hosting_environment_name: + :type hosting_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.disable_recommendation_for_hosting_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'hostingEnvironmentName': self._serialize.url("hosting_environment_name", hosting_environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['environmentName'] = self._serialize.query("environment_name", environment_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + + def list_history_for_web_app( + self, + resource_group_name, # type: str + site_name, # type: str + expired_only=None, # type: Optional[bool] + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RecommendationCollection"] + """Get past recommendations for an app, optionally specified by the time range. + + Description for Get past recommendations for an app, optionally specified by the time range. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Name of the app. + :type site_name: str + :param expired_only: Specify :code:`false` to return all recommendations. The + default is :code:`true`, which returns only expired recommendations. + :type expired_only: bool + :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or + channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecommendationCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_history_for_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if expired_only is not None: + query_parameters['expiredOnly'] = self._serialize.query("expired_only", expired_only, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RecommendationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + + def list_recommended_rules_for_web_app( + self, + resource_group_name, # type: str + site_name, # type: str + featured=None, # type: Optional[bool] + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RecommendationCollection"] + """Get all recommendations for an app. + + Description for Get all recommendations for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Name of the app. + :type site_name: str + :param featured: Specify :code:`true` to return only the most critical + recommendations. The default is :code:`false`, which returns all recommendations. + :type featured: bool + :param filter: Return only channels specified in the filter. Filter is specified by using OData + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecommendationCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_recommended_rules_for_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if featured is not None: + query_parameters['featured'] = self._serialize.query("featured", featured, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RecommendationCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + + def disable_all_for_web_app( + self, + resource_group_name, # type: str + site_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Disable all recommendations for an app. + + Description for Disable all recommendations for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Name of the app. + :type site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.disable_all_for_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + + def reset_all_filters_for_web_app( + self, + resource_group_name, # type: str + site_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Reset all recommendation opt-out settings for an app. + + Description for Reset all recommendation opt-out settings for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Name of the app. + :type site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reset_all_filters_for_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + + def get_rule_details_by_web_app( + self, + resource_group_name, # type: str + site_name, # type: str + name, # type: str + update_seen=None, # type: Optional[bool] + recommendation_id=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.RecommendationRule" + """Get a recommendation rule for an app. + + Description for Get a recommendation rule for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Name of the app. + :type site_name: str + :param name: Name of the recommendation. + :type name: str + :param update_seen: Specify :code:`true` to update the last-seen timestamp of the + recommendation object. + :type update_seen: bool + :param recommendation_id: The GUID of the recommendation object if you query an expired one. + You don't need to specify it to query an active entry. + :type recommendation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RecommendationRule, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RecommendationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_rule_details_by_web_app.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if update_seen is not None: + query_parameters['updateSeen'] = self._serialize.query("update_seen", update_seen, 'bool') + if recommendation_id is not None: + query_parameters['recommendationId'] = self._serialize.query("recommendation_id", recommendation_id, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RecommendationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + + def disable_recommendation_for_site( + self, + resource_group_name, # type: str + site_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Disables the specific rule for a web site permanently. + + Description for Disables the specific rule for a web site permanently. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param site_name: Site name. + :type site_name: str + :param name: Rule name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.disable_recommendation_for_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_resource_health_metadata_operations.py new file mode 100644 index 000000000000..d257197ba1a6 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_resource_health_metadata_operations.py @@ -0,0 +1,481 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ResourceHealthMetadataOperations(object): + """ResourceHealthMetadataOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceHealthMetadataCollection"] + """List all ResourceHealthMetadata for all sites in the subscription. + + Description for List all ResourceHealthMetadata for all sites in the subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceHealthMetadataCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceHealthMetadataCollection"] + """List all ResourceHealthMetadata for all sites in the resource group in the subscription. + + Description for List all ResourceHealthMetadata for all sites in the resource group in the + subscription. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceHealthMetadataCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + + def list_by_site( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceHealthMetadataCollection"] + """Gets the category of ResourceHealthMetadata to use for the given site as a collection. + + Description for Gets the category of ResourceHealthMetadata to use for the given site as a + collection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceHealthMetadataCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + + def get_by_site( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceHealthMetadata" + """Gets the category of ResourceHealthMetadata to use for the given site. + + Description for Gets the category of ResourceHealthMetadata to use for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceHealthMetadata, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadata"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_by_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + + def list_by_site_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceHealthMetadataCollection"] + """Gets the category of ResourceHealthMetadata to use for the given site as a collection. + + Description for Gets the category of ResourceHealthMetadata to use for the given site as a + collection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_site_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceHealthMetadataCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + + def get_by_site_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceHealthMetadata" + """Gets the category of ResourceHealthMetadata to use for the given site. + + Description for Gets the category of ResourceHealthMetadata to use for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceHealthMetadata, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadata + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadata"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_by_site_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceHealthMetadata', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_static_sites_operations.py new file mode 100644 index 000000000000..075959061889 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_static_sites_operations.py @@ -0,0 +1,4221 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class StaticSitesOperations(object): + """StaticSitesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def preview_workflow( + self, + location, # type: str + static_sites_workflow_preview_request, # type: "_models.StaticSitesWorkflowPreviewRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSitesWorkflowPreview" + """Generates a preview workflow file for the static site. + + Description for Generates a preview workflow file for the static site. + + :param location: Location where you plan to create the static site. + :type location: str + :param static_sites_workflow_preview_request: A JSON representation of the + StaticSitesWorkflowPreviewRequest properties. See example. + :type static_sites_workflow_preview_request: ~azure.mgmt.web.v2020_12_01.models.StaticSitesWorkflowPreviewRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSitesWorkflowPreview, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSitesWorkflowPreview + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSitesWorkflowPreview"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.preview_workflow.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSitesWorkflowPreview', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StaticSiteCollection"] + """Get all Static Sites for a subscription. + + Description for Get all Static Sites for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + + def get_static_sites_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StaticSiteCollection"] + """Gets all static sites in the specified resource group. + + Description for Gets all static sites in the specified resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_static_sites_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + + def get_static_site( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteARMResource" + """Gets the details of a static site. + + Description for Gets the details of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_static_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + def _create_or_update_static_site_initial( + self, + resource_group_name, # type: str + name, # type: str + static_site_envelope, # type: "_models.StaticSiteARMResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteARMResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + def begin_create_or_update_static_site( + self, + resource_group_name, # type: str + name, # type: str + static_site_envelope, # type: "_models.StaticSiteARMResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.StaticSiteARMResource"] + """Creates a new static site in an existing resource group, or updates an existing static site. + + Description for Creates a new static site in an existing resource group, or updates an existing + static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site to create or update. + :type name: str + :param static_site_envelope: A JSON representation of the staticsite properties. See example. + :type static_site_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either StaticSiteARMResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_static_site_initial( + resource_group_name=resource_group_name, + name=name, + static_site_envelope=static_site_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + def _delete_static_site_initial( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + def begin_delete_static_site( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a static site. + + Description for Deletes a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site to delete. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_static_site_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + def update_static_site( + self, + resource_group_name, # type: str + name, # type: str + static_site_envelope, # type: "_models.StaticSitePatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteARMResource" + """Creates a new static site in an existing resource group, or updates an existing static site. + + Description for Creates a new static site in an existing resource group, or updates an existing + static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site to create or update. + :type name: str + :param static_site_envelope: A JSON representation of the staticsite properties. See example. + :type static_site_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSitePatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_static_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + + def list_static_site_users( + self, + resource_group_name, # type: str + name, # type: str + authprovider, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StaticSiteUserCollection"] + """Gets the list of users of a static site. + + Description for Gets the list of users of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param authprovider: The auth provider for the users. + :type authprovider: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteUserCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_static_site_users.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'authprovider': self._serialize.url("authprovider", authprovider, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteUserCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + + def delete_static_site_user( + self, + resource_group_name, # type: str + name, # type: str + authprovider, # type: str + userid, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the user entry from the static site. + + Description for Deletes the user entry from the static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the staticsite. + :type name: str + :param authprovider: The auth provider for this user. + :type authprovider: str + :param userid: The user id of the user. + :type userid: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_static_site_user.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'authprovider': self._serialize.url("authprovider", authprovider, 'str'), + 'userid': self._serialize.url("userid", userid, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + + def update_static_site_user( + self, + resource_group_name, # type: str + name, # type: str + authprovider, # type: str + userid, # type: str + static_site_user_envelope, # type: "_models.StaticSiteUserARMResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteUserARMResource" + """Updates a user entry with the listed roles. + + Description for Updates a user entry with the listed roles. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param authprovider: The auth provider for this user. + :type authprovider: str + :param userid: The user id of the user. + :type userid: str + :param static_site_user_envelope: A JSON representation of the StaticSiteUser properties. See + example. + :type static_site_user_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteUserARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_static_site_user.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'authprovider': self._serialize.url("authprovider", authprovider, 'str'), + 'userid': self._serialize.url("userid", userid, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteUserARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + + def get_static_site_builds( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StaticSiteBuildCollection"] + """Gets all static site builds for a particular static site. + + Description for Gets all static site builds for a particular static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteBuildCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_static_site_builds.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteBuildCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + + def get_static_site_build( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteBuildARMResource" + """Gets the details of a static site build. + + Description for Gets the details of a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteBuildARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_static_site_build.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteBuildARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + + def _delete_static_site_build_initial( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_static_site_build_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + + def begin_delete_static_site_build( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a static site build. + + Description for Deletes a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_static_site_build_initial( + resource_group_name=resource_group_name, + name=name, + environment_name=environment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + + def create_or_update_static_site_build_app_settings( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + app_settings, # type: "_models.StringDictionary" + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Creates or updates the app settings of a static site build. + + Description for Creates or updates the app settings of a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :param app_settings: The dictionary containing the static site app settings to update. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_static_site_build_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings'} # type: ignore + + def create_or_update_static_site_build_function_app_settings( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + app_settings, # type: "_models.StringDictionary" + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Creates or updates the function app settings of a static site build. + + Description for Creates or updates the function app settings of a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :param app_settings: The dictionary containing the static site function app settings to update. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_static_site_build_function_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings'} # type: ignore + + def list_static_site_build_functions( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StaticSiteFunctionOverviewCollection"] + """Gets the functions of a particular static site build. + + Description for Gets the functions of a particular static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteFunctionOverviewCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_static_site_build_functions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteFunctionOverviewCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} # type: ignore + + def list_static_site_build_app_settings( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Gets the application settings of a static site build. + + Description for Gets the application settings of a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_build_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} # type: ignore + + def list_static_site_build_function_app_settings( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Gets the application settings of a static site build. + + Description for Gets the application settings of a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_build_function_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} # type: ignore + + def get_user_provided_function_apps_for_static_site_build( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StaticSiteUserProvidedFunctionAppsCollection"] + """Gets the details of the user provided function apps registered with a static site build. + + Description for Gets the details of the user provided function apps registered with a static + site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteUserProvidedFunctionAppsCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppsCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_user_provided_function_apps_for_static_site_build.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppsCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} # type: ignore + + def get_user_provided_function_app_for_static_site_build( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + function_app_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteUserProvidedFunctionAppARMResource" + """Gets the details of the user provided function app registered with a static site build. + + Description for Gets the details of the user provided function app registered with a static + site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :param function_app_name: Name of the function app registered with the static site build. + :type function_app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteUserProvidedFunctionAppARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_user_provided_function_app_for_static_site_build.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_user_provided_function_app_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + def _register_user_provided_function_app_with_static_site_build_initial( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + function_app_name, # type: str + static_site_user_provided_function_envelope, # type: "_models.StaticSiteUserProvidedFunctionAppARMResource" + is_forced=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteUserProvidedFunctionAppARMResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._register_user_provided_function_app_with_static_site_build_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if is_forced is not None: + query_parameters['isForced'] = self._serialize.query("is_forced", is_forced, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + def begin_register_user_provided_function_app_with_static_site_build( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + function_app_name, # type: str + static_site_user_provided_function_envelope, # type: "_models.StaticSiteUserProvidedFunctionAppARMResource" + is_forced=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"] + """Register a user provided function app with a static site build. + + Description for Register a user provided function app with a static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :param function_app_name: Name of the function app to register with the static site build. + :type function_app_name: str + :param static_site_user_provided_function_envelope: A JSON representation of the user provided + function app properties. See example. + :type static_site_user_provided_function_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource + :param is_forced: Specify :code:`true` to force the update of the auth + configuration on the function app even if an AzureStaticWebApps provider is already configured + on the function app. The default is :code:`false`. + :type is_forced: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either StaticSiteUserProvidedFunctionAppARMResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._register_user_provided_function_app_with_static_site_build_initial( + resource_group_name=resource_group_name, + name=name, + environment_name=environment_name, + function_app_name=function_app_name, + static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, + is_forced=is_forced, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + def detach_user_provided_function_app_from_static_site_build( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + function_app_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Detach the user provided function app from the static site build. + + Description for Detach the user provided function app from the static site build. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: The stage site identifier. + :type environment_name: str + :param function_app_name: Name of the function app registered with the static site build. + :type function_app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.detach_user_provided_function_app_from_static_site_build.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + def _create_zip_deployment_for_static_site_build_initial( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + static_site_zip_deployment_envelope, # type: "_models.StaticSiteZipDeploymentARMResource" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_zip_deployment_for_static_site_build_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _create_zip_deployment_for_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + + def begin_create_zip_deployment_for_static_site_build( + self, + resource_group_name, # type: str + name, # type: str + environment_name, # type: str + static_site_zip_deployment_envelope, # type: "_models.StaticSiteZipDeploymentARMResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deploys zipped content to a specific environment of a static site. + + Description for Deploys zipped content to a specific environment of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param environment_name: Name of the environment. + :type environment_name: str + :param static_site_zip_deployment_envelope: A JSON representation of the + StaticSiteZipDeployment properties. See example. + :type static_site_zip_deployment_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteZipDeploymentARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_zip_deployment_for_static_site_build_initial( + resource_group_name=resource_group_name, + name=name, + environment_name=environment_name, + static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'environmentName': self._serialize.url("environment_name", environment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + + def create_or_update_static_site_app_settings( + self, + resource_group_name, # type: str + name, # type: str + app_settings, # type: "_models.StringDictionary" + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Creates or updates the app settings of a static site. + + Description for Creates or updates the app settings of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param app_settings: The dictionary containing the static site app settings to update. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_static_site_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} # type: ignore + + def create_or_update_static_site_function_app_settings( + self, + resource_group_name, # type: str + name, # type: str + app_settings, # type: "_models.StringDictionary" + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Creates or updates the function app settings of a static site. + + Description for Creates or updates the function app settings of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param app_settings: The dictionary containing the static site function app settings to update. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_static_site_function_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + + def create_user_roles_invitation_link( + self, + resource_group_name, # type: str + name, # type: str + static_site_user_roles_invitation_envelope, # type: "_models.StaticSiteUserInvitationRequestResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteUserInvitationResponseResource" + """Creates an invitation link for a user with the role. + + Description for Creates an invitation link for a user with the role. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param static_site_user_roles_invitation_envelope: + :type static_site_user_roles_invitation_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserInvitationRequestResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteUserInvitationResponseResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserInvitationResponseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserInvitationResponseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_user_roles_invitation_link.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteUserInvitationResponseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + + def list_static_site_custom_domains( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StaticSiteCustomDomainOverviewCollection"] + """Gets all static site custom domains for a particular static site. + + Description for Gets all static site custom domains for a particular static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site resource to search in. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteCustomDomainOverviewCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_static_site_custom_domains.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteCustomDomainOverviewCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + + def get_static_site_custom_domain( + self, + resource_group_name, # type: str + name, # type: str + domain_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteCustomDomainOverviewARMResource" + """Gets an existing custom domain for a particular static site. + + Description for Gets an existing custom domain for a particular static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site resource to search in. + :type name: str + :param domain_name: The custom domain name. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteCustomDomainOverviewARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_static_site_custom_domain.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + + def _create_or_update_static_site_custom_domain_initial( + self, + resource_group_name, # type: str + name, # type: str + domain_name, # type: str + static_site_custom_domain_request_properties_envelope, # type: "_models.StaticSiteCustomDomainRequestPropertiesARMResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteCustomDomainOverviewARMResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_static_site_custom_domain_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + + def begin_create_or_update_static_site_custom_domain( + self, + resource_group_name, # type: str + name, # type: str + domain_name, # type: str + static_site_custom_domain_request_properties_envelope, # type: "_models.StaticSiteCustomDomainRequestPropertiesARMResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.StaticSiteCustomDomainOverviewARMResource"] + """Creates a new static site custom domain in an existing resource group and static site. + + Description for Creates a new static site custom domain in an existing resource group and + static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param domain_name: The custom domain to create. + :type domain_name: str + :param static_site_custom_domain_request_properties_envelope: A JSON representation of the + static site custom domain request properties. See example. + :type static_site_custom_domain_request_properties_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainRequestPropertiesARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either StaticSiteCustomDomainOverviewARMResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_static_site_custom_domain_initial( + resource_group_name=resource_group_name, + name=name, + domain_name=domain_name, + static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StaticSiteCustomDomainOverviewARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + + def _delete_static_site_custom_domain_initial( + self, + resource_group_name, # type: str + name, # type: str + domain_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_static_site_custom_domain_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + + def begin_delete_static_site_custom_domain( + self, + resource_group_name, # type: str + name, # type: str + domain_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a custom domain. + + Description for Deletes a custom domain. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param domain_name: The custom domain to delete. + :type domain_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_static_site_custom_domain_initial( + resource_group_name=resource_group_name, + name=name, + domain_name=domain_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + + def _validate_custom_domain_can_be_added_to_static_site_initial( + self, + resource_group_name, # type: str + name, # type: str + domain_name, # type: str + static_site_custom_domain_request_properties_envelope, # type: "_models.StaticSiteCustomDomainRequestPropertiesARMResource" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._validate_custom_domain_can_be_added_to_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + + def begin_validate_custom_domain_can_be_added_to_static_site( + self, + resource_group_name, # type: str + name, # type: str + domain_name, # type: str + static_site_custom_domain_request_properties_envelope, # type: "_models.StaticSiteCustomDomainRequestPropertiesARMResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Validates a particular custom domain can be added to a static site. + + Description for Validates a particular custom domain can be added to a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param domain_name: The custom domain to validate. + :type domain_name: str + :param static_site_custom_domain_request_properties_envelope: A JSON representation of the + static site custom domain request properties. See example. + :type static_site_custom_domain_request_properties_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainRequestPropertiesARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._validate_custom_domain_can_be_added_to_static_site_initial( + resource_group_name=resource_group_name, + name=name, + domain_name=domain_name, + static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + + def _detach_static_site_initial( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._detach_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _detach_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + + def begin_detach_static_site( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Detaches a static site. + + Description for Detaches a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site to detach. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._detach_static_site_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + + def list_static_site_functions( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StaticSiteFunctionOverviewCollection"] + """Gets the functions of a static site. + + Description for Gets the functions of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteFunctionOverviewCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_static_site_functions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteFunctionOverviewCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + + def list_static_site_app_settings( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Gets the application settings of a static site. + + Description for Gets the application settings of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} # type: ignore + + def list_static_site_configured_roles( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringList" + """Lists the roles configured for the static site. + + Description for Lists the roles configured for the static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringList, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_configured_roles.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} # type: ignore + + def list_static_site_function_app_settings( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Gets the application settings of a static site. + + Description for Gets the application settings of a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_function_app_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + + def list_static_site_secrets( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Lists the secrets for an existing static site. + + Description for Lists the secrets for an existing static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_static_site_secrets.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + + def get_private_endpoint_connection_list( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionCollection"] + """Gets the list of private endpoint connections associated with a static site. + + Description for Gets the list of private endpoint connections associated with a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} # type: ignore + + def get_private_endpoint_connection( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RemotePrivateEndpointConnectionARMResource" + """Gets a private endpoint connection. + + Description for Gets a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RemotePrivateEndpointConnectionARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _approve_or_reject_private_endpoint_connection_initial( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_wrapper, # type: "_models.PrivateLinkConnectionApprovalRequestResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.RemotePrivateEndpointConnectionARMResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._approve_or_reject_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_approve_or_reject_private_endpoint_connection( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_wrapper, # type: "_models.PrivateLinkConnectionApprovalRequestResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"] + """Approves or rejects a private endpoint connection. + + Description for Approves or rejects a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param private_endpoint_wrapper: Request body. + :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionApprovalRequestResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either RemotePrivateEndpointConnectionARMResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._approve_or_reject_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_wrapper=private_endpoint_wrapper, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_private_endpoint_connection_initial( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> object + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 204: + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete_private_endpoint_connection( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[object] + """Deletes a private endpoint connection. + + Description for Deletes a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either object or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[object] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[object] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def get_private_link_resources( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesWrapper" + """Gets the private link resources. + + Description for Gets the private link resources. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesWrapper, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesWrapper"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_link_resources.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} # type: ignore + + def reset_static_site_api_key( + self, + resource_group_name, # type: str + name, # type: str + reset_properties_envelope, # type: "_models.StaticSiteResetPropertiesARMResource" + **kwargs # type: Any + ): + # type: (...) -> None + """Resets the api key for an existing static site. + + Description for Resets the api key for an existing static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param reset_properties_envelope: + :type reset_properties_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteResetPropertiesARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.reset_static_site_api_key.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + + def get_user_provided_function_apps_for_static_site( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.StaticSiteUserProvidedFunctionAppsCollection"] + """Gets the details of the user provided function apps registered with a static site. + + Description for Gets the details of the user provided function apps registered with a static + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StaticSiteUserProvidedFunctionAppsCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppsCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_user_provided_function_apps_for_static_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppsCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} # type: ignore + + def get_user_provided_function_app_for_static_site( + self, + resource_group_name, # type: str + name, # type: str + function_app_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteUserProvidedFunctionAppARMResource" + """Gets the details of the user provided function app registered with a static site. + + Description for Gets the details of the user provided function app registered with a static + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param function_app_name: Name of the function app registered with the static site. + :type function_app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StaticSiteUserProvidedFunctionAppARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_user_provided_function_app_for_static_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + def _register_user_provided_function_app_with_static_site_initial( + self, + resource_group_name, # type: str + name, # type: str + function_app_name, # type: str + static_site_user_provided_function_envelope, # type: "_models.StaticSiteUserProvidedFunctionAppARMResource" + is_forced=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> "_models.StaticSiteUserProvidedFunctionAppARMResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._register_user_provided_function_app_with_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if is_forced is not None: + query_parameters['isForced'] = self._serialize.query("is_forced", is_forced, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _register_user_provided_function_app_with_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + def begin_register_user_provided_function_app_with_static_site( + self, + resource_group_name, # type: str + name, # type: str + function_app_name, # type: str + static_site_user_provided_function_envelope, # type: "_models.StaticSiteUserProvidedFunctionAppARMResource" + is_forced=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"] + """Register a user provided function app with a static site. + + Description for Register a user provided function app with a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param function_app_name: Name of the function app to register with the static site. + :type function_app_name: str + :param static_site_user_provided_function_envelope: A JSON representation of the user provided + function app properties. See example. + :type static_site_user_provided_function_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource + :param is_forced: Specify :code:`true` to force the update of the auth + configuration on the function app even if an AzureStaticWebApps provider is already configured + on the function app. The default is :code:`false`. + :type is_forced: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either StaticSiteUserProvidedFunctionAppARMResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._register_user_provided_function_app_with_static_site_initial( + resource_group_name=resource_group_name, + name=name, + function_app_name=function_app_name, + static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, + is_forced=is_forced, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StaticSiteUserProvidedFunctionAppARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + def detach_user_provided_function_app_from_static_site( + self, + resource_group_name, # type: str + name, # type: str + function_app_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Detach the user provided function app from the static site. + + Description for Detach the user provided function app from the static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param function_app_name: Name of the function app registered with the static site. + :type function_app_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.detach_user_provided_function_app_from_static_site.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionAppName': self._serialize.url("function_app_name", function_app_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + + def _create_zip_deployment_for_static_site_initial( + self, + resource_group_name, # type: str + name, # type: str + static_site_zip_deployment_envelope, # type: "_models.StaticSiteZipDeploymentARMResource" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_zip_deployment_for_static_site_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _create_zip_deployment_for_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + + def begin_create_zip_deployment_for_static_site( + self, + resource_group_name, # type: str + name, # type: str + static_site_zip_deployment_envelope, # type: "_models.StaticSiteZipDeploymentARMResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deploys zipped content to a static site. + + Description for Deploys zipped content to a static site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the static site. + :type name: str + :param static_site_zip_deployment_envelope: A JSON representation of the + StaticSiteZipDeployment properties. See example. + :type static_site_zip_deployment_envelope: ~azure.mgmt.web.v2020_12_01.models.StaticSiteZipDeploymentARMResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_zip_deployment_for_static_site_initial( + resource_group_name=resource_group_name, + name=name, + static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_top_level_domains_operations.py new file mode 100644 index 000000000000..f5f57ec4272d --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_top_level_domains_operations.py @@ -0,0 +1,259 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class TopLevelDomainsOperations(object): + """TopLevelDomainsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.TopLevelDomainCollection"] + """Get all top-level domains supported for registration. + + Description for Get all top-level domains supported for registration. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TopLevelDomainCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TopLevelDomainCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TopLevelDomainCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + + def get( + self, + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.TopLevelDomain" + """Get details of a top-level domain. + + Description for Get details of a top-level domain. + + :param name: Name of the top-level domain. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TopLevelDomain, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.TopLevelDomain + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomain"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TopLevelDomain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + + def list_agreements( + self, + name, # type: str + agreement_option, # type: "_models.TopLevelDomainAgreementOption" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.TldLegalAgreementCollection"] + """Gets all legal agreements that user needs to accept before purchasing a domain. + + Description for Gets all legal agreements that user needs to accept before purchasing a domain. + + :param name: Name of the top-level domain. + :type name: str + :param agreement_option: Domain agreement options. + :type agreement_option: ~azure.mgmt.web.v2020_12_01.models.TopLevelDomainAgreementOption + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TldLegalAgreementCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TldLegalAgreementCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_agreements.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(agreement_option, 'TopLevelDomainAgreementOption') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TldLegalAgreementCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_apps_operations.py new file mode 100644 index 000000000000..4fd05dedff12 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_apps_operations.py @@ -0,0 +1,29927 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WebAppsOperations(object): + """WebAppsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.web.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebAppCollection"] + """Get all apps for a subscription. + + Description for Get all apps for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + include_slots=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebAppCollection"] + """Gets all web, mobile, and API apps in the specified resource group. + + Description for Gets all web, mobile, and API apps in the specified resource group. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param include_slots: Specify :code:`true` to include deployment slots in + results. The default is false, which only gives you the production slot of all apps. + :type include_slots: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if include_slots is not None: + query_parameters['includeSlots'] = self._serialize.query("include_slots", include_slots, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + + def get( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.Site"] + """Gets the details of a web, mobile, or API app. + + Description for Gets the details of a web, mobile, or API app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Site, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Site"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + name, # type: str + site_envelope, # type: "_models.Site" + **kwargs # type: Any + ): + # type: (...) -> "_models.Site" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_envelope, 'Site') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + name, # type: str + site_envelope, # type: "_models.Site" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Site"] + """Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + + Description for Creates a new web, mobile, or API app in an existing resource group, or updates + an existing app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Unique name of the app to create or update. To create or update a deployment slot, + use the {slot} parameter. + :type name: str + :param site_envelope: A JSON representation of the app properties. See example. + :type site_envelope: ~azure.mgmt.web.v2020_12_01.models.Site + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Site or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.Site] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + name, # type: str + delete_metrics=None, # type: Optional[bool] + delete_empty_server_farm=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a web, mobile, or API app, or one of the deployment slots. + + Description for Deletes a web, mobile, or API app, or one of the deployment slots. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app to delete. + :type name: str + :param delete_metrics: If true, web app metrics are also deleted. + :type delete_metrics: bool + :param delete_empty_server_farm: Specify false if you want to keep empty App Service plan. By + default, empty App Service plan is deleted. + :type delete_empty_server_farm: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if delete_metrics is not None: + query_parameters['deleteMetrics'] = self._serialize.query("delete_metrics", delete_metrics, 'bool') + if delete_empty_server_farm is not None: + query_parameters['deleteEmptyServerFarm'] = self._serialize.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + name, # type: str + site_envelope, # type: "_models.SitePatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.Site" + """Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + + Description for Creates a new web, mobile, or API app in an existing resource group, or updates + an existing app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Unique name of the app to create or update. To create or update a deployment slot, + use the {slot} parameter. + :type name: str + :param site_envelope: A JSON representation of the app properties. See example. + :type site_envelope: ~azure.mgmt.web.v2020_12_01.models.SitePatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Site, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + + def analyze_custom_hostname( + self, + resource_group_name, # type: str + name, # type: str + host_name=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.CustomHostnameAnalysisResult" + """Analyze a custom hostname. + + Description for Analyze a custom hostname. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param host_name: Custom hostname. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomHostnameAnalysisResult, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CustomHostnameAnalysisResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomHostnameAnalysisResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.analyze_custom_hostname.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + + def apply_slot_config_to_production( + self, + resource_group_name, # type: str + name, # type: str + slot_swap_entity, # type: "_models.CsmSlotEntity" + **kwargs # type: Any + ): + # type: (...) -> None + """Applies the configuration settings from the target slot onto the current slot. + + Description for Applies the configuration settings from the target slot onto the current slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.apply_slot_config_to_production.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + + def backup( + self, + resource_group_name, # type: str + name, # type: str + request, # type: "_models.BackupRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupItem" + """Creates a backup of an app. + + Description for Creates a backup of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param request: Backup configuration. You can use the JSON response from the POST action as + input here. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.backup.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + + def list_backups( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BackupItemCollection"] + """Gets existing backups of an app. + + Description for Gets existing backups of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupItemCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_backups.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BackupItemCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + + def get_backup_status( + self, + resource_group_name, # type: str + name, # type: str + backup_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupItem" + """Gets a backup of an app by its ID. + + Description for Gets a backup of an app by its ID. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_backup_status.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + + def delete_backup( + self, + resource_group_name, # type: str + name, # type: str + backup_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a backup of an app by its ID. + + Description for Deletes a backup of an app by its ID. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_backup.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + + def list_backup_status_secrets( + self, + resource_group_name, # type: str + name, # type: str + backup_id, # type: str + request, # type: "_models.BackupRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupItem" + """Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + + Description for Gets status of a web app backup that may be in progress, including secrets + associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the + SAS URL for the backup if a new URL is passed in the request body. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param backup_id: ID of backup. + :type backup_id: str + :param request: Information on backup request. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_backup_status_secrets.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + + def _restore_initial( + self, + resource_group_name, # type: str + name, # type: str + backup_id, # type: str + request, # type: "_models.RestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + + def begin_restore( + self, + resource_group_name, # type: str + name, # type: str + backup_id, # type: str + request, # type: "_models.RestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restores a specific backup to another app (or deployment slot, if specified). + + Description for Restores a specific backup to another app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restore_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + + def get_basic_publishing_credentials_policies( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CsmPublishingCredentialsPoliciesCollection" + """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + + Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesCollection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_basic_publishing_credentials_policies.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + + def get_ftp_allowed( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CsmPublishingCredentialsPoliciesEntity" + """Returns whether FTP is allowed on the site or not. + + Description for Returns whether FTP is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ftp_allowed.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + + def update_ftp_allowed( + self, + resource_group_name, # type: str + name, # type: str + csm_publishing_access_policies_entity, # type: "_models.CsmPublishingCredentialsPoliciesEntity" + **kwargs # type: Any + ): + # type: (...) -> "_models.CsmPublishingCredentialsPoliciesEntity" + """Updates whether FTP is allowed on the site or not. + + Description for Updates whether FTP is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param csm_publishing_access_policies_entity: + :type csm_publishing_access_policies_entity: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_ftp_allowed.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + + def get_scm_allowed( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CsmPublishingCredentialsPoliciesEntity" + """Returns whether Scm basic auth is allowed on the site or not. + + Description for Returns whether Scm basic auth is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_scm_allowed.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + + def update_scm_allowed( + self, + resource_group_name, # type: str + name, # type: str + csm_publishing_access_policies_entity, # type: "_models.CsmPublishingCredentialsPoliciesEntity" + **kwargs # type: Any + ): + # type: (...) -> "_models.CsmPublishingCredentialsPoliciesEntity" + """Updates whether user publishing credentials are allowed on the site or not. + + Description for Updates whether user publishing credentials are allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param csm_publishing_access_policies_entity: + :type csm_publishing_access_policies_entity: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_scm_allowed.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + + def list_configurations( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SiteConfigResourceCollection"] + """List the configurations of an app. + + Description for List the configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteConfigResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_configurations.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SiteConfigResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + + def update_application_settings( + self, + resource_group_name, # type: str + name, # type: str + app_settings, # type: "_models.StringDictionary" + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Replaces the application settings of an app. + + Description for Replaces the application settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param app_settings: Application settings of the app. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_application_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + + def list_application_settings( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Gets the application settings of an app. + + Description for Gets the application settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_application_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + + def update_auth_settings( + self, + resource_group_name, # type: str + name, # type: str + site_auth_settings, # type: "_models.SiteAuthSettings" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteAuthSettings" + """Updates the Authentication / Authorization settings associated with web app. + + Description for Updates the Authentication / Authorization settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param site_auth_settings: Auth settings associated with web app. + :type site_auth_settings: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_auth_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + + def get_auth_settings( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteAuthSettings" + """Gets the Authentication/Authorization settings of an app. + + Description for Gets the Authentication/Authorization settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_auth_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + + def update_auth_settings_v2( + self, + resource_group_name, # type: str + name, # type: str + site_auth_settings_v2, # type: "_models.SiteAuthSettingsV2" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteAuthSettingsV2" + """Updates site's Authentication / Authorization settings for apps via the V2 format. + + Description for Updates site's Authentication / Authorization settings for apps via the V2 + format. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param site_auth_settings_v2: Auth settings associated with web app. + :type site_auth_settings_v2: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettingsV2, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_auth_settings_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + + def get_auth_settings_v2( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteAuthSettingsV2" + """Gets site's Authentication / Authorization settings for apps via the V2 format. + + Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettingsV2, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_auth_settings_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + + def update_azure_storage_accounts( + self, + resource_group_name, # type: str + name, # type: str + azure_storage_accounts, # type: "_models.AzureStoragePropertyDictionaryResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AzureStoragePropertyDictionaryResource" + """Updates the Azure storage account configurations of an app. + + Description for Updates the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param azure_storage_accounts: Azure storage accounts of the app. + :type azure_storage_accounts: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureStoragePropertyDictionaryResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureStoragePropertyDictionaryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_azure_storage_accounts.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + + def list_azure_storage_accounts( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AzureStoragePropertyDictionaryResource" + """Gets the Azure storage account configurations of an app. + + Description for Gets the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureStoragePropertyDictionaryResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureStoragePropertyDictionaryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_azure_storage_accounts.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + + def update_backup_configuration( + self, + resource_group_name, # type: str + name, # type: str + request, # type: "_models.BackupRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupRequest" + """Updates the backup configuration of an app. + + Description for Updates the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param request: Edited backup configuration. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_backup_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + + def delete_backup_configuration( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the backup configuration of an app. + + Description for Deletes the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_backup_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + + def get_backup_configuration( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupRequest" + """Gets the backup configuration of an app. + + Description for Gets the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_backup_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + + def get_app_settings_key_vault_references( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApiKVReferenceCollection"] + """Gets the config reference app settings and status of an app. + + Description for Gets the config reference app settings and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApiKVReferenceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_app_settings_key_vault_references.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApiKVReferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + + def get_app_setting_key_vault_reference( + self, + resource_group_name, # type: str + name, # type: str + app_setting_key, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ApiKVReference" + """Gets the config reference and status of an app. + + Description for Gets the config reference and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param app_setting_key: App Setting key name. + :type app_setting_key: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApiKVReference, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReference"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_app_setting_key_vault_reference.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'appSettingKey': self._serialize.url("app_setting_key", app_setting_key, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApiKVReference', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + + def get_site_connection_string_key_vault_references( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApiKVReferenceCollection"] + """Gets the config reference app settings and status of an app. + + Description for Gets the config reference app settings and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApiKVReferenceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_site_connection_string_key_vault_references.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApiKVReferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} # type: ignore + + def get_site_connection_string_key_vault_reference( + self, + resource_group_name, # type: str + name, # type: str + connection_string_key, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ApiKVReference" + """Gets the config reference and status of an app. + + Description for Gets the config reference and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param connection_string_key: + :type connection_string_key: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApiKVReference, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReference"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_connection_string_key_vault_reference.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'connectionStringKey': self._serialize.url("connection_string_key", connection_string_key, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApiKVReference', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + + def update_connection_strings( + self, + resource_group_name, # type: str + name, # type: str + connection_strings, # type: "_models.ConnectionStringDictionary" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectionStringDictionary" + """Replaces the connection strings of an app. + + Description for Replaces the connection strings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param connection_strings: Connection strings of the app or deployment slot. See example. + :type connection_strings: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionStringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionStringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_connection_strings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + + def list_connection_strings( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectionStringDictionary" + """Gets the connection strings of an app. + + Description for Gets the connection strings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionStringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionStringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_connection_strings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + + def get_diagnostic_logs_configuration( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteLogsConfig" + """Gets the logging configuration of an app. + + Description for Gets the logging configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteLogsConfig, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteLogsConfig"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_diagnostic_logs_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteLogsConfig', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + + def update_diagnostic_logs_config( + self, + resource_group_name, # type: str + name, # type: str + site_logs_config, # type: "_models.SiteLogsConfig" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteLogsConfig" + """Updates the logging configuration of an app. + + Description for Updates the logging configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param site_logs_config: A SiteLogsConfig JSON object that contains the logging configuration + to change in the "properties" property. + :type site_logs_config: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteLogsConfig, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteLogsConfig"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_diagnostic_logs_config.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteLogsConfig', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + + def update_metadata( + self, + resource_group_name, # type: str + name, # type: str + metadata, # type: "_models.StringDictionary" + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Replaces the metadata of an app. + + Description for Replaces the metadata of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param metadata: Edited metadata of the app or deployment slot. See example. + :type metadata: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_metadata.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(metadata, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + + def list_metadata( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Gets the metadata of an app. + + Description for Gets the metadata of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_metadata.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + + def _list_publishing_credentials_initial( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.User" + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._list_publishing_credentials_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + + def begin_list_publishing_credentials( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.User"] + """Gets the Git/FTP publishing credentials of an app. + + Description for Gets the Git/FTP publishing credentials of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either User or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_publishing_credentials_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + + def update_site_push_settings( + self, + resource_group_name, # type: str + name, # type: str + push_settings, # type: "_models.PushSettings" + **kwargs # type: Any + ): + # type: (...) -> "_models.PushSettings" + """Updates the Push settings associated with web app. + + Description for Updates the Push settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param push_settings: Push settings associated with web app. + :type push_settings: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PushSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PushSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_site_push_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(push_settings, 'PushSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PushSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + + def list_site_push_settings( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PushSettings" + """Gets the Push settings associated with web app. + + Description for Gets the Push settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PushSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PushSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_site_push_settings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PushSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + + def list_slot_configuration_names( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SlotConfigNamesResource" + """Gets the names of app settings and connection strings that stick to the slot (not swapped). + + Description for Gets the names of app settings and connection strings that stick to the slot + (not swapped). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SlotConfigNamesResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SlotConfigNamesResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotConfigNamesResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_slot_configuration_names.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + + def update_slot_configuration_names( + self, + resource_group_name, # type: str + name, # type: str + slot_config_names, # type: "_models.SlotConfigNamesResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.SlotConfigNamesResource" + """Updates the names of application settings and connection string that remain with the slot during swap operation. + + Description for Updates the names of application settings and connection string that remain + with the slot during swap operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot_config_names: Names of application settings and connection strings. See example. + :type slot_config_names: ~azure.mgmt.web.v2020_12_01.models.SlotConfigNamesResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SlotConfigNamesResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SlotConfigNamesResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotConfigNamesResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_slot_configuration_names.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SlotConfigNamesResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + + def get_configuration( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteConfigResource" + """Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + + Description for Gets the configuration of an app, such as platform version and bitness, default + documents, virtual applications, Always On, etc. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + + def create_or_update_configuration( + self, + resource_group_name, # type: str + name, # type: str + site_config, # type: "_models.SiteConfigResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteConfigResource" + """Updates the configuration of an app. + + Description for Updates the configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param site_config: JSON representation of a SiteConfig object. See example. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_config, 'SiteConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + + def update_configuration( + self, + resource_group_name, # type: str + name, # type: str + site_config, # type: "_models.SiteConfigResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteConfigResource" + """Updates the configuration of an app. + + Description for Updates the configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param site_config: JSON representation of a SiteConfig object. See example. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_configuration.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_config, 'SiteConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + + def list_configuration_snapshot_info( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SiteConfigurationSnapshotInfoCollection"] + """Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + + Description for Gets a list of web app configuration snapshots identifiers. Each element of the + list contains a timestamp and the ID of the snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteConfigurationSnapshotInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SiteConfigurationSnapshotInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + + def get_configuration_snapshot( + self, + resource_group_name, # type: str + name, # type: str + snapshot_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteConfigResource" + """Gets a snapshot of the configuration of an app at a previous point in time. + + Description for Gets a snapshot of the configuration of an app at a previous point in time. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param snapshot_id: The ID of the snapshot to read. + :type snapshot_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_configuration_snapshot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + + def recover_site_configuration_snapshot( + self, + resource_group_name, # type: str + name, # type: str + snapshot_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Reverts the configuration of an app to a previous snapshot. + + Description for Reverts the configuration of an app to a previous snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param snapshot_id: The ID of the snapshot to read. + :type snapshot_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.recover_site_configuration_snapshot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + + def get_web_site_container_logs( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional[IO] + """Gets the last lines of docker logs for the given site. + + Description for Gets the last lines of docker logs for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/octet-stream" + + # Construct URL + url = self.get_web_site_container_logs.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + + def get_container_logs_zip( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional[IO] + """Gets the ZIP archived docker log files for the given site. + + Description for Gets the ZIP archived docker log files for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/zip" + + # Construct URL + url = self.get_container_logs_zip.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + + def list_continuous_web_jobs( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ContinuousWebJobCollection"] + """List continuous web jobs for an app, or a deployment slot. + + Description for List continuous web jobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContinuousWebJobCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ContinuousWebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + + def get_continuous_web_job( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ContinuousWebJob"] + """Gets a continuous web job by its ID for an app, or a deployment slot. + + Description for Gets a continuous web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContinuousWebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ContinuousWebJob"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_continuous_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + + def delete_continuous_web_job( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a continuous web job by its ID for an app, or a deployment slot. + + Description for Delete a continuous web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_continuous_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + + def start_continuous_web_job( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Start a continuous web job for an app, or a deployment slot. + + Description for Start a continuous web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start_continuous_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + + def stop_continuous_web_job( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Stop a continuous web job for an app, or a deployment slot. + + Description for Stop a continuous web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_continuous_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + + def list_deployments( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DeploymentCollection"] + """List deployments for an app, or a deployment slot. + + Description for List deployments for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DeploymentCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_deployments.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DeploymentCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + + def get_deployment( + self, + resource_group_name, # type: str + name, # type: str + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Deployment" + """Get a deployment by its ID for an app, or a deployment slot. + + Description for Get a deployment by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: Deployment ID. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_deployment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + + def create_deployment( + self, + resource_group_name, # type: str + name, # type: str + id, # type: str + deployment, # type: "_models.Deployment" + **kwargs # type: Any + ): + # type: (...) -> "_models.Deployment" + """Create a deployment for an app, or a deployment slot. + + Description for Create a deployment for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: ID of an existing deployment. + :type id: str + :param deployment: Deployment details. + :type deployment: ~azure.mgmt.web.v2020_12_01.models.Deployment + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_deployment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(deployment, 'Deployment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + + def delete_deployment( + self, + resource_group_name, # type: str + name, # type: str + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a deployment by its ID for an app, or a deployment slot. + + Description for Delete a deployment by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: Deployment ID. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_deployment.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + + def list_deployment_log( + self, + resource_group_name, # type: str + name, # type: str + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Deployment" + """List deployment log for specific deployment for an app, or a deployment slot. + + Description for List deployment log for specific deployment for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: The ID of a specific deployment. This is the value of the name property in the JSON + response from "GET /api/sites/{siteName}/deployments". + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_deployment_log.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + + def discover_backup( + self, + resource_group_name, # type: str + name, # type: str + request, # type: "_models.RestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.RestoreRequest" + """Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + + Description for Discovers an existing app backup that can be restored from a blob in Azure + storage. Use this to get information about the databases stored in a backup. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param request: A RestoreRequest object that includes Azure storage URL and blog name for + discovery of backup. + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RestoreRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.discover_backup.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RestoreRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + + def list_domain_ownership_identifiers( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.IdentifierCollection"] + """Lists ownership identifiers for domain associated with web app. + + Description for Lists ownership identifiers for domain associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IdentifierCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('IdentifierCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + + def get_domain_ownership_identifier( + self, + resource_group_name, # type: str + name, # type: str + domain_ownership_identifier_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Identifier" + """Get domain ownership identifier for web app. + + Description for Get domain ownership identifier for web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_domain_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + def create_or_update_domain_ownership_identifier( + self, + resource_group_name, # type: str + name, # type: str + domain_ownership_identifier_name, # type: str + domain_ownership_identifier, # type: "_models.Identifier" + **kwargs # type: Any + ): + # type: (...) -> "_models.Identifier" + """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + + Description for Creates a domain ownership identifier for web app, or updates an existing + ownership identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.Identifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_domain_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + def delete_domain_ownership_identifier( + self, + resource_group_name, # type: str + name, # type: str + domain_ownership_identifier_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a domain ownership identifier for a web app. + + Description for Deletes a domain ownership identifier for a web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_domain_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + def update_domain_ownership_identifier( + self, + resource_group_name, # type: str + name, # type: str + domain_ownership_identifier_name, # type: str + domain_ownership_identifier, # type: "_models.Identifier" + **kwargs # type: Any + ): + # type: (...) -> "_models.Identifier" + """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + + Description for Creates a domain ownership identifier for web app, or updates an existing + ownership identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.Identifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_domain_ownership_identifier.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + def get_ms_deploy_status( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MSDeployStatus" + """Get the status of the last MSDeploy operation. + + Description for Get the status of the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ms_deploy_status.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + + def _create_ms_deploy_operation_initial( + self, + resource_group_name, # type: str + name, # type: str + ms_deploy, # type: "_models.MSDeploy" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MSDeployStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployStatus"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_ms_deploy_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + + def begin_create_ms_deploy_operation( + self, + resource_group_name, # type: str + name, # type: str + ms_deploy, # type: "_models.MSDeploy" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MSDeployStatus"] + """Invoke the MSDeploy web app extension. + + Description for Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param ms_deploy: Details of MSDeploy operation. + :type ms_deploy: ~azure.mgmt.web.v2020_12_01.models.MSDeploy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + ms_deploy=ms_deploy, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + + def get_ms_deploy_log( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MSDeployLog"] + """Get the MSDeploy Log for the last MSDeploy operation. + + Description for Get the MSDeploy Log for the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployLog, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployLog"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ms_deploy_log.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + + def list_functions( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.FunctionEnvelopeCollection"] + """List the functions for a web site, or a deployment slot. + + Description for List the functions for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FunctionEnvelopeCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopeCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_functions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('FunctionEnvelopeCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + + def get_functions_admin_token( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> str + """Fetch a short lived token that can be exchanged for a master key. + + Description for Fetch a short lived token that can be exchanged for a master key. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_functions_admin_token.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + + def get_function( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.FunctionEnvelope"] + """Get function information by its ID for web site, or a deployment slot. + + Description for Get function information by its ID for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionEnvelope, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FunctionEnvelope"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_function.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + + def _create_function_initial( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + function_envelope, # type: "_models.FunctionEnvelope" + **kwargs # type: Any + ): + # type: (...) -> "_models.FunctionEnvelope" + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_function_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + + def begin_create_function( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + function_envelope, # type: "_models.FunctionEnvelope" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.FunctionEnvelope"] + """Create function for web site, or a deployment slot. + + Description for Create function for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param function_envelope: Function details. + :type function_envelope: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_function_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + function_envelope=function_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + + def delete_function( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a function for web site, or a deployment slot. + + Description for Delete a function for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_function.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + + def create_or_update_function_secret( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + key_name, # type: str + key, # type: "_models.KeyInfo" + **kwargs # type: Any + ): + # type: (...) -> "_models.KeyInfo" + """Add or update a function secret. + + Description for Add or update a function secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: The name of the function. + :type function_name: str + :param key_name: The name of the key. + :type key_name: str + :param key: The key to create or update. + :type key: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KeyInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_function_secret.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key, 'KeyInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + + def delete_function_secret( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + key_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a function secret. + + Description for Delete a function secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: The name of the function. + :type function_name: str + :param key_name: The name of the key. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_function_secret.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + + def list_function_keys( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Get function keys for a function in a web site, or a deployment slot. + + Description for Get function keys for a function in a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_function_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + + def list_function_secrets( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.FunctionSecrets" + """Get function secrets for a function in a web site, or a deployment slot. + + Description for Get function secrets for a function in a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_function_secrets.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + + def list_host_keys( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HostKeys" + """Get host secrets for a function app. + + Description for Get host secrets for a function app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostKeys, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_host_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + + def list_sync_status( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """This is to allow calling via powershell and ARM template. + + Description for This is to allow calling via powershell and ARM template. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_sync_status.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + + def sync_functions( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Syncs function trigger metadata to the management database. + + Description for Syncs function trigger metadata to the management database. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_functions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + + def create_or_update_host_secret( + self, + resource_group_name, # type: str + name, # type: str + key_type, # type: str + key_name, # type: str + key, # type: "_models.KeyInfo" + **kwargs # type: Any + ): + # type: (...) -> "_models.KeyInfo" + """Add or update a host level secret. + + Description for Add or update a host level secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param key_type: The type of host key. + :type key_type: str + :param key_name: The name of the key. + :type key_name: str + :param key: The key to create or update. + :type key: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KeyInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_host_secret.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'keyType': self._serialize.url("key_type", key_type, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key, 'KeyInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + + def delete_host_secret( + self, + resource_group_name, # type: str + name, # type: str + key_type, # type: str + key_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a host level secret. + + Description for Delete a host level secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param key_type: The type of host key. + :type key_type: str + :param key_name: The name of the key. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_host_secret.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'keyType': self._serialize.url("key_type", key_type, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + + def list_host_name_bindings( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.HostNameBindingCollection"] + """Get hostname bindings for an app or a deployment slot. + + Description for Get hostname bindings for an app or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HostNameBindingCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBindingCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_host_name_bindings.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('HostNameBindingCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + + def get_host_name_binding( + self, + resource_group_name, # type: str + name, # type: str + host_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HostNameBinding" + """Get the named hostname binding for an app (or deployment slot, if specified). + + Description for Get the named hostname binding for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostNameBinding, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBinding"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_host_name_binding.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostNameBinding', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + + def create_or_update_host_name_binding( + self, + resource_group_name, # type: str + name, # type: str + host_name, # type: str + host_name_binding, # type: "_models.HostNameBinding" + **kwargs # type: Any + ): + # type: (...) -> "_models.HostNameBinding" + """Creates a hostname binding for an app. + + Description for Creates a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :param host_name_binding: Binding details. This is the JSON representation of a HostNameBinding + object. + :type host_name_binding: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostNameBinding, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBinding"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_host_name_binding.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostNameBinding', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + + def delete_host_name_binding( + self, + resource_group_name, # type: str + name, # type: str + host_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a hostname binding for an app. + + Description for Deletes a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_host_name_binding.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + + def get_hybrid_connection( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnection" + """Retrieves a specific Service Bus Hybrid Connection used by this Web App. + + Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + def create_or_update_hybrid_connection( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + connection_envelope, # type: "_models.HybridConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnection" + """Creates a new Hybrid Connection using a Service Bus relay. + + Description for Creates a new Hybrid Connection using a Service Bus relay. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param connection_envelope: The details of the hybrid connection. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + def delete_hybrid_connection( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Removes a Hybrid Connection from this site. + + Description for Removes a Hybrid Connection from this site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + def update_hybrid_connection( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + connection_envelope, # type: "_models.HybridConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnection" + """Creates a new Hybrid Connection using a Service Bus relay. + + Description for Creates a new Hybrid Connection using a Service Bus relay. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param connection_envelope: The details of the hybrid connection. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_hybrid_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + def list_hybrid_connections( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnection" + """Retrieves all Service Bus Hybrid Connections used by this Web App. + + Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_hybrid_connections.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + + def list_relay_service_connections( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RelayServiceConnectionEntity" + """Gets hybrid connections configured for an app (or deployment slot, if specified). + + Description for Gets hybrid connections configured for an app (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_relay_service_connections.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + + def get_relay_service_connection( + self, + resource_group_name, # type: str + name, # type: str + entity_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RelayServiceConnectionEntity" + """Gets a hybrid connection configuration by its name. + + Description for Gets a hybrid connection configuration by its name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection. + :type entity_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_relay_service_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + + def create_or_update_relay_service_connection( + self, + resource_group_name, # type: str + name, # type: str + entity_name, # type: str + connection_envelope, # type: "_models.RelayServiceConnectionEntity" + **kwargs # type: Any + ): + # type: (...) -> "_models.RelayServiceConnectionEntity" + """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + + Description for Creates a new hybrid connection configuration (PUT), or updates an existing one + (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param connection_envelope: Details of the hybrid connection configuration. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_relay_service_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + + def delete_relay_service_connection( + self, + resource_group_name, # type: str + name, # type: str + entity_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a relay service connection by its name. + + Description for Deletes a relay service connection by its name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_relay_service_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + + def update_relay_service_connection( + self, + resource_group_name, # type: str + name, # type: str + entity_name, # type: str + connection_envelope, # type: "_models.RelayServiceConnectionEntity" + **kwargs # type: Any + ): + # type: (...) -> "_models.RelayServiceConnectionEntity" + """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + + Description for Creates a new hybrid connection configuration (PUT), or updates an existing one + (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param connection_envelope: Details of the hybrid connection configuration. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_relay_service_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + + def list_instance_identifiers( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebAppInstanceStatusCollection"] + """Gets all scale-out instances of an app. + + Description for Gets all scale-out instances of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppInstanceStatusCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppInstanceStatusCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_identifiers.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppInstanceStatusCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + + def get_instance_info( + self, + resource_group_name, # type: str + name, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WebSiteInstanceStatus" + """Gets all scale-out instances of an app. + + Description for Gets all scale-out instances of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param instance_id: + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebSiteInstanceStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebSiteInstanceStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_info.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + + def get_instance_ms_deploy_status( + self, + resource_group_name, # type: str + name, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MSDeployStatus" + """Get the status of the last MSDeploy operation. + + Description for Get the status of the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param instance_id: ID of web app instance. + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_ms_deploy_status.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + def _create_instance_ms_deploy_operation_initial( + self, + resource_group_name, # type: str + name, # type: str + instance_id, # type: str + ms_deploy, # type: "_models.MSDeploy" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MSDeployStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployStatus"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_instance_ms_deploy_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + def begin_create_instance_ms_deploy_operation( + self, + resource_group_name, # type: str + name, # type: str + instance_id, # type: str + ms_deploy, # type: "_models.MSDeploy" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MSDeployStatus"] + """Invoke the MSDeploy web app extension. + + Description for Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param instance_id: ID of web app instance. + :type instance_id: str + :param ms_deploy: Details of MSDeploy operation. + :type ms_deploy: ~azure.mgmt.web.v2020_12_01.models.MSDeploy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_instance_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + instance_id=instance_id, + ms_deploy=ms_deploy, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + def get_instance_ms_deploy_log( + self, + resource_group_name, # type: str + name, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MSDeployLog"] + """Get the MSDeploy Log for the last MSDeploy operation. + + Description for Get the MSDeploy Log for the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param instance_id: ID of web app instance. + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployLog, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployLog"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_ms_deploy_log.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + + def list_instance_processes( + self, + resource_group_name, # type: str + name, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessInfoCollection"] + """Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + + Description for Get list of processes for a web site, or a deployment slot, or for a specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_processes.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + + def get_instance_process( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProcessInfo"] + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + + def delete_instance_process( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + + Description for Terminate a process by its ID for a web site, or a deployment slot, or specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_instance_process.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + + def get_instance_process_dump( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional[IO] + """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + + Description for Get a memory dump of a process by its ID for a specific scaled-out instance in + a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process_dump.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + + def list_instance_process_modules( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessModuleInfoCollection"] + """List module information for a process by its ID for a specific scaled-out instance in a web site. + + Description for List module information for a process by its ID for a specific scaled-out + instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessModuleInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_process_modules.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessModuleInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + + def get_instance_process_module( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + base_address, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProcessModuleInfo"] + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param base_address: Module base address. + :type base_address: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessModuleInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessModuleInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process_module.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'baseAddress': self._serialize.url("base_address", base_address, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + + def list_instance_process_threads( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessThreadInfoCollection"] + """List the threads in a process by its ID for a specific scaled-out instance in a web site. + + Description for List the threads in a process by its ID for a specific scaled-out instance in a + web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessThreadInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_process_threads.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessThreadInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + + def is_cloneable( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteCloneability" + """Shows whether an app can be cloned to another resource group or subscription. + + Description for Shows whether an app can be cloned to another resource group or subscription. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteCloneability, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteCloneability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteCloneability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.is_cloneable.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteCloneability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + + def list_site_backups( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BackupItemCollection"] + """Gets existing backups of an app. + + Description for Gets existing backups of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupItemCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_backups.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BackupItemCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + + def list_sync_function_triggers( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.FunctionSecrets" + """This is to allow calling via powershell and ARM template. + + Description for This is to allow calling via powershell and ARM template. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_sync_function_triggers.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + + def _migrate_storage_initial( + self, + subscription_name, # type: str + resource_group_name, # type: str + name, # type: str + migration_options, # type: "_models.StorageMigrationOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.StorageMigrationResponse" + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._migrate_storage_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + + def begin_migrate_storage( + self, + subscription_name, # type: str + resource_group_name, # type: str + name, # type: str + migration_options, # type: "_models.StorageMigrationOptions" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.StorageMigrationResponse"] + """Restores a web app. + + Description for Restores a web app. + + :param subscription_name: Azure subscription. + :type subscription_name: str + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param migration_options: Migration migrationOptions. + :type migration_options: ~azure.mgmt.web.v2020_12_01.models.StorageMigrationOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either StorageMigrationResponse or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.StorageMigrationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._migrate_storage_initial( + subscription_name=subscription_name, + resource_group_name=resource_group_name, + name=name, + migration_options=migration_options, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('StorageMigrationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + + def _migrate_my_sql_initial( + self, + resource_group_name, # type: str + name, # type: str + migration_request_envelope, # type: "_models.MigrateMySqlRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.Operation" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._migrate_my_sql_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Operation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + + def begin_migrate_my_sql( + self, + resource_group_name, # type: str + name, # type: str + migration_request_envelope, # type: "_models.MigrateMySqlRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Operation"] + """Migrates a local (in-app) MySql database to a remote MySql database. + + Description for Migrates a local (in-app) MySql database to a remote MySql database. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param migration_request_envelope: MySql migration options. + :type migration_request_envelope: ~azure.mgmt.web.v2020_12_01.models.MigrateMySqlRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Operation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._migrate_my_sql_initial( + resource_group_name=resource_group_name, + name=name, + migration_request_envelope=migration_request_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Operation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + + def get_migrate_my_sql_status( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MigrateMySqlStatus" + """Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + + Description for Returns the status of MySql in app migration, if one is active, and whether or + not MySql in app is enabled. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MigrateMySqlStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MigrateMySqlStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MigrateMySqlStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_migrate_my_sql_status.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + + def get_swift_virtual_network_connection( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SwiftVirtualNetwork" + """Gets a Swift Virtual Network connection. + + Description for Gets a Swift Virtual Network connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SwiftVirtualNetwork, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SwiftVirtualNetwork + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SwiftVirtualNetwork"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_swift_virtual_network_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + + def delete_swift_virtual_network( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a Swift Virtual Network connection from an app (or deployment slot). + + Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_swift_virtual_network.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + + def list_network_features( + self, + resource_group_name, # type: str + name, # type: str + view, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.NetworkFeatures"] + """Gets all network features used by the app (or deployment slot, if specified). + + Description for Gets all network features used by the app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param view: The type of view. Only "summary" is supported at this time. + :type view: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkFeatures, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.NetworkFeatures or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetworkFeatures"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_network_features.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'view': self._serialize.url("view", view, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + + def get_network_trace_operation( + self, + resource_group_name, # type: str + name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_trace_operation.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + + def start_web_site_network_trace( + self, + resource_group_name, # type: str + name, # type: str + duration_in_seconds=None, # type: Optional[int] + max_frame_length=None, # type: Optional[int] + sas_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> str + """Start capturing network packets for the site (To be deprecated). + + Description for Start capturing network packets for the site (To be deprecated). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start_web_site_network_trace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + + def _start_web_site_network_trace_operation_initial( + self, + resource_group_name, # type: str + name, # type: str + duration_in_seconds=None, # type: Optional[int] + max_frame_length=None, # type: Optional[int] + sas_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._start_web_site_network_trace_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + + def begin_start_web_site_network_trace_operation( + self, + resource_group_name, # type: str + name, # type: str + duration_in_seconds=None, # type: Optional[int] + max_frame_length=None, # type: Optional[int] + sas_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[List["_models.NetworkTrace"]] + """Start capturing network packets for the site. + + Description for Start capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_web_site_network_trace_operation_initial( + resource_group_name=resource_group_name, + name=name, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + + def stop_web_site_network_trace( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Stop ongoing capturing network packets for the site. + + Description for Stop ongoing capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_web_site_network_trace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + + def get_network_traces( + self, + resource_group_name, # type: str + name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_traces.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + + def get_network_trace_operation_v2( + self, + resource_group_name, # type: str + name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_trace_operation_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + + def get_network_traces_v2( + self, + resource_group_name, # type: str + name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_traces_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + + def generate_new_site_publishing_password( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Generates a new publishing password for an app (or deployment slot, if specified). + + Description for Generates a new publishing password for an app (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.generate_new_site_publishing_password.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + + def list_perf_mon_counters( + self, + resource_group_name, # type: str + name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PerfMonCounterCollection"] + """Gets perfmon counters for web app. + + Description for Gets perfmon counters for web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param filter: Return only usages/metrics specified in the filter. Filter conforms to odata + syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z + and timeGrain eq duration'[Hour|Minute|Day]'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PerfMonCounterCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PerfMonCounterCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_perf_mon_counters.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PerfMonCounterCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + + def get_site_php_error_log_flag( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SitePhpErrorLogFlag" + """Gets web app's event logs. + + Description for Gets web app's event logs. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SitePhpErrorLogFlag, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SitePhpErrorLogFlag + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SitePhpErrorLogFlag"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_php_error_log_flag.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + + def list_premier_add_ons( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PremierAddOn" + """Gets the premier add-ons of an app. + + Description for Gets the premier add-ons of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_premier_add_ons.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + + def get_premier_add_on( + self, + resource_group_name, # type: str + name, # type: str + premier_add_on_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PremierAddOn" + """Gets a named add-on of an app. + + Description for Gets a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_premier_add_on.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + + def add_premier_add_on( + self, + resource_group_name, # type: str + name, # type: str + premier_add_on_name, # type: str + premier_add_on, # type: "_models.PremierAddOn" + **kwargs # type: Any + ): + # type: (...) -> "_models.PremierAddOn" + """Updates a named add-on of an app. + + Description for Updates a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param premier_add_on: A JSON representation of the edited premier add-on. + :type premier_add_on: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.add_premier_add_on.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + + def delete_premier_add_on( + self, + resource_group_name, # type: str + name, # type: str + premier_add_on_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a premier add-on from an app. + + Description for Delete a premier add-on from an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_premier_add_on.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + + def update_premier_add_on( + self, + resource_group_name, # type: str + name, # type: str + premier_add_on_name, # type: str + premier_add_on, # type: "_models.PremierAddOnPatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.PremierAddOn" + """Updates a named add-on of an app. + + Description for Updates a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param premier_add_on: A JSON representation of the edited premier add-on. + :type premier_add_on: ~azure.mgmt.web.v2020_12_01.models.PremierAddOnPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_premier_add_on.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + + def get_private_access( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateAccess" + """Gets data around private site access enablement and authorized Virtual Networks that can access the site. + + Description for Gets data around private site access enablement and authorized Virtual Networks + that can access the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateAccess, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateAccess"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_access.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + + def put_private_access_vnet( + self, + resource_group_name, # type: str + name, # type: str + access, # type: "_models.PrivateAccess" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateAccess" + """Sets data around private site access enablement and authorized Virtual Networks that can access the site. + + Description for Sets data around private site access enablement and authorized Virtual Networks + that can access the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param access: The information for the private access. + :type access: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateAccess, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateAccess"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put_private_access_vnet.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(access, 'PrivateAccess') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + + def get_private_endpoint_connection_list( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionCollection"] + """Gets the list of private endpoint connections associated with a site. + + Description for Gets the list of private endpoint connections associated with a site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} # type: ignore + + def get_private_endpoint_connection( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RemotePrivateEndpointConnectionARMResource" + """Gets a private endpoint connection. + + Description for Gets a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RemotePrivateEndpointConnectionARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _approve_or_reject_private_endpoint_connection_initial( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_wrapper, # type: "_models.PrivateLinkConnectionApprovalRequestResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.RemotePrivateEndpointConnectionARMResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._approve_or_reject_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_approve_or_reject_private_endpoint_connection( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_wrapper, # type: "_models.PrivateLinkConnectionApprovalRequestResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"] + """Approves or rejects a private endpoint connection. + + Description for Approves or rejects a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param private_endpoint_wrapper: + :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionApprovalRequestResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either RemotePrivateEndpointConnectionARMResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._approve_or_reject_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_wrapper=private_endpoint_wrapper, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_private_endpoint_connection_initial( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> object + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 204: + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete_private_endpoint_connection( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[object] + """Deletes a private endpoint connection. + + Description for Deletes a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either object or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[object] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[object] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def get_private_link_resources( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesWrapper" + """Gets the private link resources. + + Description for Gets the private link resources. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesWrapper, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesWrapper"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_link_resources.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + + def list_processes( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessInfoCollection"] + """Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + + Description for Get list of processes for a web site, or a deployment slot, or for a specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_processes.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + + def get_process( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProcessInfo"] + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + + def delete_process( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + + Description for Terminate a process by its ID for a web site, or a deployment slot, or specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_process.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + + def get_process_dump( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional[IO] + """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + + Description for Get a memory dump of a process by its ID for a specific scaled-out instance in + a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process_dump.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + + def list_process_modules( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessModuleInfoCollection"] + """List module information for a process by its ID for a specific scaled-out instance in a web site. + + Description for List module information for a process by its ID for a specific scaled-out + instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessModuleInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_process_modules.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessModuleInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + + def get_process_module( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + base_address, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProcessModuleInfo"] + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param base_address: Module base address. + :type base_address: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessModuleInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessModuleInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process_module.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'baseAddress': self._serialize.url("base_address", base_address, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + + def list_process_threads( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessThreadInfoCollection"] + """List the threads in a process by its ID for a specific scaled-out instance in a web site. + + Description for List the threads in a process by its ID for a specific scaled-out instance in a + web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessThreadInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_process_threads.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessThreadInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + + def list_public_certificates( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PublicCertificateCollection"] + """Get public certificates for an app or a deployment slot. + + Description for Get public certificates for an app or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicCertificateCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificateCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_public_certificates.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PublicCertificateCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + + def get_public_certificate( + self, + resource_group_name, # type: str + name, # type: str + public_certificate_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PublicCertificate" + """Get the named public certificate for an app (or deployment slot, if specified). + + Description for Get the named public certificate for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_public_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + + def create_or_update_public_certificate( + self, + resource_group_name, # type: str + name, # type: str + public_certificate_name, # type: str + public_certificate, # type: "_models.PublicCertificate" + **kwargs # type: Any + ): + # type: (...) -> "_models.PublicCertificate" + """Creates a hostname binding for an app. + + Description for Creates a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :param public_certificate: Public certificate details. This is the JSON representation of a + PublicCertificate object. + :type public_certificate: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_public_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + + def delete_public_certificate( + self, + resource_group_name, # type: str + name, # type: str + public_certificate_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a hostname binding for an app. + + Description for Deletes a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_public_certificate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + + def list_publishing_profile_xml_with_secrets( + self, + resource_group_name, # type: str + name, # type: str + publishing_profile_options, # type: "_models.CsmPublishingProfileOptions" + **kwargs # type: Any + ): + # type: (...) -> IO + """Gets the publishing profile for an app (or deployment slot, if specified). + + Description for Gets the publishing profile for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param publishing_profile_options: Specifies publishingProfileOptions for publishing profile. + For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + :type publishing_profile_options: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingProfileOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[IO] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/xml" + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + + def reset_production_slot_config( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + + Description for Resets the configuration settings of the current slot if they were previously + modified by calling the API with POST. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reset_production_slot_config.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + + def restart( + self, + resource_group_name, # type: str + name, # type: str + soft_restart=None, # type: Optional[bool] + synchronous=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Restarts an app (or deployment slot, if specified). + + Description for Restarts an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param soft_restart: Specify true to apply the configuration settings and restarts the app only + if necessary. By default, the API always restarts and reprovisions the app. + :type soft_restart: bool + :param synchronous: Specify true to block until the app is restarted. By default, it is set to + false, and the API responds immediately (asynchronous). + :type synchronous: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.restart.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + if synchronous is not None: + query_parameters['synchronous'] = self._serialize.query("synchronous", synchronous, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + + def _restore_from_backup_blob_initial( + self, + resource_group_name, # type: str + name, # type: str + request, # type: "_models.RestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_from_backup_blob_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + + def begin_restore_from_backup_blob( + self, + resource_group_name, # type: str + name, # type: str + request, # type: "_models.RestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restores an app from a backup blob in Azure Storage. + + Description for Restores an app from a backup blob in Azure Storage. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restore_from_backup_blob_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + + def _restore_from_deleted_app_initial( + self, + resource_group_name, # type: str + name, # type: str + restore_request, # type: "_models.DeletedAppRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_from_deleted_app_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + + def begin_restore_from_deleted_app( + self, + resource_group_name, # type: str + name, # type: str + restore_request, # type: "_models.DeletedAppRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restores a deleted web app to this web app. + + Description for Restores a deleted web app to this web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param restore_request: Deleted web app restore information. + :type restore_request: ~azure.mgmt.web.v2020_12_01.models.DeletedAppRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restore_from_deleted_app_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + + def _restore_snapshot_initial( + self, + resource_group_name, # type: str + name, # type: str + restore_request, # type: "_models.SnapshotRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_snapshot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + + def begin_restore_snapshot( + self, + resource_group_name, # type: str + name, # type: str + restore_request, # type: "_models.SnapshotRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restores a web app from a snapshot. + + Description for Restores a web app from a snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param restore_request: Snapshot restore settings. Snapshot information can be obtained by + calling GetDeletedSites or GetSiteSnapshots API. + :type restore_request: ~azure.mgmt.web.v2020_12_01.models.SnapshotRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restore_snapshot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + + def list_site_extensions( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SiteExtensionInfoCollection"] + """Get list of siteextensions for a web site, or a deployment slot. + + Description for Get list of siteextensions for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteExtensionInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_extensions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SiteExtensionInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + + def get_site_extension( + self, + resource_group_name, # type: str + name, # type: str + site_extension_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.SiteExtensionInfo"] + """Get site extension information by its ID for a web site, or a deployment slot. + + Description for Get site extension information by its ID for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteExtensionInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SiteExtensionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_extension.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + + def _install_site_extension_initial( + self, + resource_group_name, # type: str + name, # type: str + site_extension_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.SiteExtensionInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SiteExtensionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._install_site_extension_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.put(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 429]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + + def begin_install_site_extension( + self, + resource_group_name, # type: str + name, # type: str + site_extension_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.SiteExtensionInfo"] + """Install site extension on a web site, or a deployment slot. + + Description for Install site extension on a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._install_site_extension_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + + def delete_site_extension( + self, + resource_group_name, # type: str + name, # type: str + site_extension_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove a site extension from a web site, or a deployment slot. + + Description for Remove a site extension from a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_site_extension.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + + def list_slots( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebAppCollection"] + """Gets an app's deployment slots. + + Description for Gets an app's deployment slots. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_slots.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + + def get_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.Site"] + """Gets the details of a web, mobile, or API app. + + Description for Gets the details of a web, mobile, or API app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. By default, this API returns the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Site, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Site"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + + def _create_or_update_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_envelope, # type: "_models.Site" + **kwargs # type: Any + ): + # type: (...) -> "_models.Site" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_envelope, 'Site') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + + def begin_create_or_update_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_envelope, # type: "_models.Site" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Site"] + """Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + + Description for Creates a new web, mobile, or API app in an existing resource group, or updates + an existing app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Unique name of the app to create or update. To create or update a deployment slot, + use the {slot} parameter. + :type name: str + :param slot: Name of the deployment slot to create or update. By default, this API attempts to + create or modify the production slot. + :type slot: str + :param site_envelope: A JSON representation of the app properties. See example. + :type site_envelope: ~azure.mgmt.web.v2020_12_01.models.Site + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Site or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.Site] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + site_envelope=site_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + + def delete_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + delete_metrics=None, # type: Optional[bool] + delete_empty_server_farm=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a web, mobile, or API app, or one of the deployment slots. + + Description for Deletes a web, mobile, or API app, or one of the deployment slots. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app to delete. + :type name: str + :param slot: Name of the deployment slot to delete. By default, the API deletes the production + slot. + :type slot: str + :param delete_metrics: If true, web app metrics are also deleted. + :type delete_metrics: bool + :param delete_empty_server_farm: Specify false if you want to keep empty App Service plan. By + default, empty App Service plan is deleted. + :type delete_empty_server_farm: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if delete_metrics is not None: + query_parameters['deleteMetrics'] = self._serialize.query("delete_metrics", delete_metrics, 'bool') + if delete_empty_server_farm is not None: + query_parameters['deleteEmptyServerFarm'] = self._serialize.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + + def update_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_envelope, # type: "_models.SitePatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.Site" + """Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + + Description for Creates a new web, mobile, or API app in an existing resource group, or updates + an existing app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Unique name of the app to create or update. To create or update a deployment slot, + use the {slot} parameter. + :type name: str + :param slot: Name of the deployment slot to create or update. By default, this API attempts to + create or modify the production slot. + :type slot: str + :param site_envelope: A JSON representation of the app properties. See example. + :type site_envelope: ~azure.mgmt.web.v2020_12_01.models.SitePatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Site, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Site + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_envelope, 'SitePatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Site', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Site', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + + def analyze_custom_hostname_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + host_name=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.CustomHostnameAnalysisResult" + """Analyze a custom hostname. + + Description for Analyze a custom hostname. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param host_name: Custom hostname. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomHostnameAnalysisResult, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CustomHostnameAnalysisResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomHostnameAnalysisResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.analyze_custom_hostname_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + + def apply_slot_configuration_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + slot_swap_entity, # type: "_models.CsmSlotEntity" + **kwargs # type: Any + ): + # type: (...) -> None + """Applies the configuration settings from the target slot onto the current slot. + + Description for Applies the configuration settings from the target slot onto the current slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the source slot. If a slot is not specified, the production slot is used + as the source slot. + :type slot: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.apply_slot_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + + def backup_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + request, # type: "_models.BackupRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupItem" + """Creates a backup of an app. + + Description for Creates a backup of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will create a + backup for the production slot. + :type slot: str + :param request: Backup configuration. You can use the JSON response from the POST action as + input here. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.backup_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + + def list_backups_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BackupItemCollection"] + """Gets existing backups of an app. + + Description for Gets existing backups of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get backups + of the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupItemCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_backups_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BackupItemCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + + def get_backup_status_slot( + self, + resource_group_name, # type: str + name, # type: str + backup_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupItem" + """Gets a backup of an app by its ID. + + Description for Gets a backup of an app by its ID. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get a backup + of the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_backup_status_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + + def delete_backup_slot( + self, + resource_group_name, # type: str + name, # type: str + backup_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a backup of an app by its ID. + + Description for Deletes a backup of an app by its ID. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete a + backup of the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_backup_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + + def list_backup_status_secrets_slot( + self, + resource_group_name, # type: str + name, # type: str + backup_id, # type: str + slot, # type: str + request, # type: "_models.BackupRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupItem" + """Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + + Description for Gets status of a web app backup that may be in progress, including secrets + associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the + SAS URL for the backup if a new URL is passed in the request body. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param backup_id: ID of backup. + :type backup_id: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param request: Information on backup request. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupItem, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_backup_status_secrets_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + + def _restore_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + backup_id, # type: str + slot, # type: str + request, # type: "_models.RestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + + def begin_restore_slot( + self, + resource_group_name, # type: str + name, # type: str + backup_id, # type: str + slot, # type: str + request, # type: "_models.RestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restores a specific backup to another app (or deployment slot, if specified). + + Description for Restores a specific backup to another app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will restore a + backup of the production slot. + :type slot: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restore_slot_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + slot=slot, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'backupId': self._serialize.url("backup_id", backup_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + + def get_basic_publishing_credentials_policies_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CsmPublishingCredentialsPoliciesCollection" + """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + + Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a + given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesCollection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_basic_publishing_credentials_policies_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} # type: ignore + + def get_ftp_allowed_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CsmPublishingCredentialsPoliciesEntity" + """Returns whether FTP is allowed on the site or not. + + Description for Returns whether FTP is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ftp_allowed_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + + def update_ftp_allowed_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + csm_publishing_access_policies_entity, # type: "_models.CsmPublishingCredentialsPoliciesEntity" + **kwargs # type: Any + ): + # type: (...) -> "_models.CsmPublishingCredentialsPoliciesEntity" + """Updates whether FTP is allowed on the site or not. + + Description for Updates whether FTP is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :param csm_publishing_access_policies_entity: + :type csm_publishing_access_policies_entity: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_ftp_allowed_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + + def get_scm_allowed_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CsmPublishingCredentialsPoliciesEntity" + """Returns whether Scm basic auth is allowed on the site or not. + + Description for Returns whether Scm basic auth is allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_scm_allowed_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + + def update_scm_allowed_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + csm_publishing_access_policies_entity, # type: "_models.CsmPublishingCredentialsPoliciesEntity" + **kwargs # type: Any + ): + # type: (...) -> "_models.CsmPublishingCredentialsPoliciesEntity" + """Updates whether user publishing credentials are allowed on the site or not. + + Description for Updates whether user publishing credentials are allowed on the site or not. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :param csm_publishing_access_policies_entity: + :type csm_publishing_access_policies_entity: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CsmPublishingCredentialsPoliciesEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingCredentialsPoliciesEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmPublishingCredentialsPoliciesEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_scm_allowed_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CsmPublishingCredentialsPoliciesEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + + def list_configurations_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SiteConfigResourceCollection"] + """List the configurations of an app. + + Description for List the configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will return + configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteConfigResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_configurations_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SiteConfigResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + + def update_application_settings_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + app_settings, # type: "_models.StringDictionary" + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Replaces the application settings of an app. + + Description for Replaces the application settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + application settings for the production slot. + :type slot: str + :param app_settings: Application settings of the app. + :type app_settings: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_application_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + + def list_application_settings_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Gets the application settings of an app. + + Description for Gets the application settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + application settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_application_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + + def update_auth_settings_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_auth_settings, # type: "_models.SiteAuthSettings" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteAuthSettings" + """Updates the Authentication / Authorization settings associated with web app. + + Description for Updates the Authentication / Authorization settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param site_auth_settings: Auth settings associated with web app. + :type site_auth_settings: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_auth_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + + def get_auth_settings_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteAuthSettings" + """Gets the Authentication/Authorization settings of an app. + + Description for Gets the Authentication/Authorization settings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_auth_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + + def update_auth_settings_v2_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_auth_settings_v2, # type: "_models.SiteAuthSettingsV2" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteAuthSettingsV2" + """Updates site's Authentication / Authorization settings for apps via the V2 format. + + Description for Updates site's Authentication / Authorization settings for apps via the V2 + format. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param site_auth_settings_v2: Auth settings associated with web app. + :type site_auth_settings_v2: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettingsV2, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_auth_settings_v2_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + + def get_auth_settings_v2_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteAuthSettingsV2" + """Gets site's Authentication / Authorization settings for apps via the V2 format. + + Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettingsV2, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteAuthSettingsV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_auth_settings_v2_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + + def update_azure_storage_accounts_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + azure_storage_accounts, # type: "_models.AzureStoragePropertyDictionaryResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AzureStoragePropertyDictionaryResource" + """Updates the Azure storage account configurations of an app. + + Description for Updates the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + Azure storage account configurations for the production slot. + :type slot: str + :param azure_storage_accounts: Azure storage accounts of the app. + :type azure_storage_accounts: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureStoragePropertyDictionaryResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureStoragePropertyDictionaryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_azure_storage_accounts_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + + def list_azure_storage_accounts_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AzureStoragePropertyDictionaryResource" + """Gets the Azure storage account configurations of an app. + + Description for Gets the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + Azure storage account configurations for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureStoragePropertyDictionaryResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AzureStoragePropertyDictionaryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureStoragePropertyDictionaryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_azure_storage_accounts_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + + def update_backup_configuration_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + request, # type: "_models.BackupRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupRequest" + """Updates the backup configuration of an app. + + Description for Updates the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + backup configuration for the production slot. + :type slot: str + :param request: Edited backup configuration. + :type request: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_backup_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'BackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + + def delete_backup_configuration_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the backup configuration of an app. + + Description for Deletes the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + backup configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_backup_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + + def get_backup_configuration_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupRequest" + """Gets the backup configuration of an app. + + Description for Gets the backup configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + backup configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.BackupRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_backup_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + + def get_app_settings_key_vault_references_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApiKVReferenceCollection"] + """Gets the config reference app settings and status of an app. + + Description for Gets the config reference app settings and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApiKVReferenceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_app_settings_key_vault_references_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApiKVReferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} # type: ignore + + def get_app_setting_key_vault_reference_slot( + self, + resource_group_name, # type: str + name, # type: str + app_setting_key, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ApiKVReference" + """Gets the config reference and status of an app. + + Description for Gets the config reference and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param app_setting_key: App Setting key name. + :type app_setting_key: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApiKVReference, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReference"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_app_setting_key_vault_reference_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'appSettingKey': self._serialize.url("app_setting_key", app_setting_key, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApiKVReference', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_app_setting_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + + def get_site_connection_string_key_vault_references_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApiKVReferenceCollection"] + """Gets the config reference app settings and status of an app. + + Description for Gets the config reference app settings and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApiKVReferenceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_site_connection_string_key_vault_references_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApiKVReferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} # type: ignore + + def get_site_connection_string_key_vault_reference_slot( + self, + resource_group_name, # type: str + name, # type: str + connection_string_key, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ApiKVReference" + """Gets the config reference and status of an app. + + Description for Gets the config reference and status of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param connection_string_key: + :type connection_string_key: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApiKVReference, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ApiKVReference + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReference"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_connection_string_key_vault_reference_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'connectionStringKey': self._serialize.url("connection_string_key", connection_string_key, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApiKVReference', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_connection_string_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + + def update_connection_strings_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + connection_strings, # type: "_models.ConnectionStringDictionary" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectionStringDictionary" + """Replaces the connection strings of an app. + + Description for Replaces the connection strings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + connection settings for the production slot. + :type slot: str + :param connection_strings: Connection strings of the app or deployment slot. See example. + :type connection_strings: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionStringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionStringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_connection_strings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + + def list_connection_strings_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectionStringDictionary" + """Gets the connection strings of an app. + + Description for Gets the connection strings of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + connection settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionStringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ConnectionStringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionStringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_connection_strings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionStringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + + def get_diagnostic_logs_configuration_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteLogsConfig" + """Gets the logging configuration of an app. + + Description for Gets the logging configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + logging configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteLogsConfig, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteLogsConfig"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_diagnostic_logs_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteLogsConfig', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + + def update_diagnostic_logs_config_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_logs_config, # type: "_models.SiteLogsConfig" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteLogsConfig" + """Updates the logging configuration of an app. + + Description for Updates the logging configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + logging configuration for the production slot. + :type slot: str + :param site_logs_config: A SiteLogsConfig JSON object that contains the logging configuration + to change in the "properties" property. + :type site_logs_config: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteLogsConfig, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteLogsConfig + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteLogsConfig"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_diagnostic_logs_config_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteLogsConfig', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + + def update_metadata_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + metadata, # type: "_models.StringDictionary" + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Replaces the metadata of an app. + + Description for Replaces the metadata of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + metadata for the production slot. + :type slot: str + :param metadata: Edited metadata of the app or deployment slot. See example. + :type metadata: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_metadata_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(metadata, 'StringDictionary') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + + def list_metadata_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Gets the metadata of an app. + + Description for Gets the metadata of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + metadata for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_metadata_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + + def _list_publishing_credentials_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.User" + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._list_publishing_credentials_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + + def begin_list_publishing_credentials_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.User"] + """Gets the Git/FTP publishing credentials of an app. + + Description for Gets the Git/FTP publishing credentials of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + publishing credentials for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either User or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_publishing_credentials_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + + def update_site_push_settings_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + push_settings, # type: "_models.PushSettings" + **kwargs # type: Any + ): + # type: (...) -> "_models.PushSettings" + """Updates the Push settings associated with web app. + + Description for Updates the Push settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param push_settings: Push settings associated with web app. + :type push_settings: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PushSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PushSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_site_push_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(push_settings, 'PushSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PushSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + + def list_site_push_settings_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PushSettings" + """Gets the Push settings associated with web app. + + Description for Gets the Push settings associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PushSettings, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PushSettings + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PushSettings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_site_push_settings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PushSettings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + + def get_configuration_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteConfigResource" + """Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + + Description for Gets the configuration of an app, such as platform version and bitness, default + documents, virtual applications, Always On, etc. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will return + configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + + def create_or_update_configuration_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_config, # type: "_models.SiteConfigResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteConfigResource" + """Updates the configuration of an app. + + Description for Updates the configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update + configuration for the production slot. + :type slot: str + :param site_config: JSON representation of a SiteConfig object. See example. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_config, 'SiteConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + + def update_configuration_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_config, # type: "_models.SiteConfigResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteConfigResource" + """Updates the configuration of an app. + + Description for Updates the configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update + configuration for the production slot. + :type slot: str + :param site_config: JSON representation of a SiteConfig object. See example. + :type site_config: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_config, 'SiteConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + + def list_configuration_snapshot_info_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SiteConfigurationSnapshotInfoCollection"] + """Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + + Description for Gets a list of web app configuration snapshots identifiers. Each element of the + list contains a timestamp and the ID of the snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will return + configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteConfigurationSnapshotInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_configuration_snapshot_info_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SiteConfigurationSnapshotInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + + def get_configuration_snapshot_slot( + self, + resource_group_name, # type: str + name, # type: str + snapshot_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteConfigResource" + """Gets a snapshot of the configuration of an app at a previous point in time. + + Description for Gets a snapshot of the configuration of an app at a previous point in time. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param snapshot_id: The ID of the snapshot to read. + :type snapshot_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will return + configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_configuration_snapshot_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + + def recover_site_configuration_snapshot_slot( + self, + resource_group_name, # type: str + name, # type: str + snapshot_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Reverts the configuration of an app to a previous snapshot. + + Description for Reverts the configuration of an app to a previous snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param snapshot_id: The ID of the snapshot to read. + :type snapshot_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will return + configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.recover_site_configuration_snapshot_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + + def get_web_site_container_logs_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional[IO] + """Gets the last lines of docker logs for the given site. + + Description for Gets the last lines of docker logs for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/octet-stream" + + # Construct URL + url = self.get_web_site_container_logs_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + + def get_container_logs_zip_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional[IO] + """Gets the ZIP archived docker log files for the given site. + + Description for Gets the ZIP archived docker log files for the given site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/zip" + + # Construct URL + url = self.get_container_logs_zip_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + + def list_continuous_web_jobs_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ContinuousWebJobCollection"] + """List continuous web jobs for an app, or a deployment slot. + + Description for List continuous web jobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContinuousWebJobCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_continuous_web_jobs_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ContinuousWebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + + def get_continuous_web_job_slot( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ContinuousWebJob"] + """Gets a continuous web job by its ID for an app, or a deployment slot. + + Description for Gets a continuous web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContinuousWebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ContinuousWebJob or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ContinuousWebJob"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_continuous_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ContinuousWebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + + def delete_continuous_web_job_slot( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a continuous web job by its ID for an app, or a deployment slot. + + Description for Delete a continuous web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_continuous_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + + def start_continuous_web_job_slot( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Start a continuous web job for an app, or a deployment slot. + + Description for Start a continuous web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start_continuous_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + + def stop_continuous_web_job_slot( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Stop a continuous web job for an app, or a deployment slot. + + Description for Stop a continuous web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_continuous_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + + def list_deployments_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DeploymentCollection"] + """List deployments for an app, or a deployment slot. + + Description for List deployments for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DeploymentCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_deployments_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DeploymentCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + + def get_deployment_slot( + self, + resource_group_name, # type: str + name, # type: str + id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Deployment" + """Get a deployment by its ID for an app, or a deployment slot. + + Description for Get a deployment by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: Deployment ID. + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API gets a deployment + for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_deployment_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + + def create_deployment_slot( + self, + resource_group_name, # type: str + name, # type: str + id, # type: str + slot, # type: str + deployment, # type: "_models.Deployment" + **kwargs # type: Any + ): + # type: (...) -> "_models.Deployment" + """Create a deployment for an app, or a deployment slot. + + Description for Create a deployment for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: ID of an existing deployment. + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API creates a + deployment for the production slot. + :type slot: str + :param deployment: Deployment details. + :type deployment: ~azure.mgmt.web.v2020_12_01.models.Deployment + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_deployment_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(deployment, 'Deployment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + + def delete_deployment_slot( + self, + resource_group_name, # type: str + name, # type: str + id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a deployment by its ID for an app, or a deployment slot. + + Description for Delete a deployment by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: Deployment ID. + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_deployment_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + + def list_deployment_log_slot( + self, + resource_group_name, # type: str + name, # type: str + id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Deployment" + """List deployment log for specific deployment for an app, or a deployment slot. + + Description for List deployment log for specific deployment for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param id: The ID of a specific deployment. This is the value of the name property in the JSON + response from "GET /api/sites/{siteName}/deployments". + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_deployment_log_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + + def discover_backup_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + request, # type: "_models.RestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.RestoreRequest" + """Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + + Description for Discovers an existing app backup that can be restored from a blob in Azure + storage. Use this to get information about the databases stored in a backup. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will perform + discovery for the production slot. + :type slot: str + :param request: A RestoreRequest object that includes Azure storage URL and blog name for + discovery of backup. + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RestoreRequest, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreRequest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.discover_backup_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RestoreRequest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + + def list_domain_ownership_identifiers_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.IdentifierCollection"] + """Lists ownership identifiers for domain associated with web app. + + Description for Lists ownership identifiers for domain associated with web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IdentifierCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_domain_ownership_identifiers_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('IdentifierCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + + def get_domain_ownership_identifier_slot( + self, + resource_group_name, # type: str + name, # type: str + domain_ownership_identifier_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Identifier" + """Get domain ownership identifier for web app. + + Description for Get domain ownership identifier for web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_domain_ownership_identifier_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + def create_or_update_domain_ownership_identifier_slot( + self, + resource_group_name, # type: str + name, # type: str + domain_ownership_identifier_name, # type: str + slot, # type: str + domain_ownership_identifier, # type: "_models.Identifier" + **kwargs # type: Any + ): + # type: (...) -> "_models.Identifier" + """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + + Description for Creates a domain ownership identifier for web app, or updates an existing + ownership identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.Identifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_domain_ownership_identifier_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + def delete_domain_ownership_identifier_slot( + self, + resource_group_name, # type: str + name, # type: str + domain_ownership_identifier_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a domain ownership identifier for a web app. + + Description for Deletes a domain ownership identifier for a web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_domain_ownership_identifier_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + def update_domain_ownership_identifier_slot( + self, + resource_group_name, # type: str + name, # type: str + domain_ownership_identifier_name, # type: str + slot, # type: str + domain_ownership_identifier, # type: "_models.Identifier" + **kwargs # type: Any + ): + # type: (...) -> "_models.Identifier" + """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + + Description for Creates a domain ownership identifier for web app, or updates an existing + ownership identifier. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param domain_ownership_identifier_name: Name of domain ownership identifier. + :type domain_ownership_identifier_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :param domain_ownership_identifier: A JSON representation of the domain ownership properties. + :type domain_ownership_identifier: ~azure.mgmt.web.v2020_12_01.models.Identifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Identifier, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.Identifier + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Identifier"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_domain_ownership_identifier_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Identifier', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + + def get_ms_deploy_status_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MSDeployStatus" + """Get the status of the last MSDeploy operation. + + Description for Get the status of the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ms_deploy_status_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + + def _create_ms_deploy_operation_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + ms_deploy, # type: "_models.MSDeploy" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MSDeployStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployStatus"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_ms_deploy_operation_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + + def begin_create_ms_deploy_operation_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + ms_deploy, # type: "_models.MSDeploy" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MSDeployStatus"] + """Invoke the MSDeploy web app extension. + + Description for Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param ms_deploy: Details of MSDeploy operation. + :type ms_deploy: ~azure.mgmt.web.v2020_12_01.models.MSDeploy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + ms_deploy=ms_deploy, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + + def get_ms_deploy_log_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MSDeployLog"] + """Get the MSDeploy Log for the last MSDeploy operation. + + Description for Get the MSDeploy Log for the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployLog, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployLog"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_ms_deploy_log_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + + def list_instance_functions_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.FunctionEnvelopeCollection"] + """List the functions for a web site, or a deployment slot. + + Description for List the functions for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FunctionEnvelopeCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopeCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_functions_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('FunctionEnvelopeCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + + def get_functions_admin_token_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> str + """Fetch a short lived token that can be exchanged for a master key. + + Description for Fetch a short lived token that can be exchanged for a master key. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_functions_admin_token_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + + def get_instance_function_slot( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.FunctionEnvelope"] + """Get function information by its ID for web site, or a deployment slot. + + Description for Get function information by its ID for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionEnvelope, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FunctionEnvelope"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_function_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + + def _create_instance_function_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + slot, # type: str + function_envelope, # type: "_models.FunctionEnvelope" + **kwargs # type: Any + ): + # type: (...) -> "_models.FunctionEnvelope" + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_instance_function_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + + def begin_create_instance_function_slot( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + slot, # type: str + function_envelope, # type: "_models.FunctionEnvelope" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.FunctionEnvelope"] + """Create function for web site, or a deployment slot. + + Description for Create function for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. + :type slot: str + :param function_envelope: Function details. + :type function_envelope: ~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either FunctionEnvelope or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_instance_function_slot_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + slot=slot, + function_envelope=function_envelope, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('FunctionEnvelope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + + def delete_instance_function_slot( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a function for web site, or a deployment slot. + + Description for Delete a function for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_instance_function_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + + def create_or_update_function_secret_slot( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + key_name, # type: str + slot, # type: str + key, # type: "_models.KeyInfo" + **kwargs # type: Any + ): + # type: (...) -> "_models.KeyInfo" + """Add or update a function secret. + + Description for Add or update a function secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: The name of the function. + :type function_name: str + :param key_name: The name of the key. + :type key_name: str + :param slot: Name of the deployment slot. + :type slot: str + :param key: The key to create or update. + :type key: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KeyInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_function_secret_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key, 'KeyInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + + def delete_function_secret_slot( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + key_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a function secret. + + Description for Delete a function secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: The name of the function. + :type function_name: str + :param key_name: The name of the key. + :type key_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_function_secret_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + + def list_function_keys_slot( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.StringDictionary" + """Get function keys for a function in a web site, or a deployment slot. + + Description for Get function keys for a function in a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: StringDictionary, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.StringDictionary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StringDictionary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_function_keys_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('StringDictionary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + + def list_function_secrets_slot( + self, + resource_group_name, # type: str + name, # type: str + function_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.FunctionSecrets" + """Get function secrets for a function in a web site, or a deployment slot. + + Description for Get function secrets for a function in a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_function_secrets_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'functionName': self._serialize.url("function_name", function_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + + def list_host_keys_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HostKeys" + """Get host secrets for a function app. + + Description for Get host secrets for a function app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostKeys, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_host_keys_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + + def list_sync_status_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """This is to allow calling via powershell and ARM template. + + Description for This is to allow calling via powershell and ARM template. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_sync_status_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + + def sync_functions_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Syncs function trigger metadata to the management database. + + Description for Syncs function trigger metadata to the management database. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_functions_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + + def create_or_update_host_secret_slot( + self, + resource_group_name, # type: str + name, # type: str + key_type, # type: str + key_name, # type: str + slot, # type: str + key, # type: "_models.KeyInfo" + **kwargs # type: Any + ): + # type: (...) -> "_models.KeyInfo" + """Add or update a host level secret. + + Description for Add or update a host level secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param key_type: The type of host key. + :type key_type: str + :param key_name: The name of the key. + :type key_name: str + :param slot: Name of the deployment slot. + :type slot: str + :param key: The key to create or update. + :type key: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KeyInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.KeyInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_host_secret_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'keyType': self._serialize.url("key_type", key_type, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(key, 'KeyInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KeyInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + + def delete_host_secret_slot( + self, + resource_group_name, # type: str + name, # type: str + key_type, # type: str + key_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a host level secret. + + Description for Delete a host level secret. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param key_type: The type of host key. + :type key_type: str + :param key_name: The name of the key. + :type key_name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_host_secret_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'keyType': self._serialize.url("key_type", key_type, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + + def list_host_name_bindings_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.HostNameBindingCollection"] + """Get hostname bindings for an app or a deployment slot. + + Description for Get hostname bindings for an app or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API gets hostname + bindings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HostNameBindingCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBindingCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_host_name_bindings_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('HostNameBindingCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + + def get_host_name_binding_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + host_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HostNameBinding" + """Get the named hostname binding for an app (or deployment slot, if specified). + + Description for Get the named hostname binding for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API the named binding + for the production slot. + :type slot: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostNameBinding, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBinding"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_host_name_binding_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostNameBinding', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + + def create_or_update_host_name_binding_slot( + self, + resource_group_name, # type: str + name, # type: str + host_name, # type: str + slot, # type: str + host_name_binding, # type: "_models.HostNameBinding" + **kwargs # type: Any + ): + # type: (...) -> "_models.HostNameBinding" + """Creates a hostname binding for an app. + + Description for Creates a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will create a + binding for the production slot. + :type slot: str + :param host_name_binding: Binding details. This is the JSON representation of a HostNameBinding + object. + :type host_name_binding: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostNameBinding, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HostNameBinding + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBinding"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_host_name_binding_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HostNameBinding', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + + def delete_host_name_binding_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + host_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a hostname binding for an app. + + Description for Deletes a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :param host_name: Hostname in the hostname binding. + :type host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_host_name_binding_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + + def get_hybrid_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnection" + """Retrieves a specific Service Bus Hybrid Connection used by this Web App. + + Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param slot: The name of the slot for the web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_hybrid_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + def create_or_update_hybrid_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + slot, # type: str + connection_envelope, # type: "_models.HybridConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnection" + """Creates a new Hybrid Connection using a Service Bus relay. + + Description for Creates a new Hybrid Connection using a Service Bus relay. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param slot: The name of the slot for the web app. + :type slot: str + :param connection_envelope: The details of the hybrid connection. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_hybrid_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + def delete_hybrid_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Removes a Hybrid Connection from this site. + + Description for Removes a Hybrid Connection from this site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param slot: The name of the slot for the web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_hybrid_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + def update_hybrid_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + namespace_name, # type: str + relay_name, # type: str + slot, # type: str + connection_envelope, # type: "_models.HybridConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnection" + """Creates a new Hybrid Connection using a Service Bus relay. + + Description for Creates a new Hybrid Connection using a Service Bus relay. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param namespace_name: The namespace for this hybrid connection. + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection. + :type relay_name: str + :param slot: The name of the slot for the web app. + :type slot: str + :param connection_envelope: The details of the hybrid connection. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_hybrid_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'HybridConnection') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + + def list_hybrid_connections_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridConnection" + """Retrieves all Service Bus Hybrid Connections used by this Web App. + + Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for the web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridConnection, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.HybridConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_hybrid_connections_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + + def list_relay_service_connections_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RelayServiceConnectionEntity" + """Gets hybrid connections configured for an app (or deployment slot, if specified). + + Description for Gets hybrid connections configured for an app (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get hybrid + connections for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_relay_service_connections_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + + def get_relay_service_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + entity_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RelayServiceConnectionEntity" + """Gets a hybrid connection configuration by its name. + + Description for Gets a hybrid connection configuration by its name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection. + :type entity_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get a hybrid + connection for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_relay_service_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + + def create_or_update_relay_service_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + entity_name, # type: str + slot, # type: str + connection_envelope, # type: "_models.RelayServiceConnectionEntity" + **kwargs # type: Any + ): + # type: (...) -> "_models.RelayServiceConnectionEntity" + """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + + Description for Creates a new hybrid connection configuration (PUT), or updates an existing one + (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will create or + update a hybrid connection for the production slot. + :type slot: str + :param connection_envelope: Details of the hybrid connection configuration. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_relay_service_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + + def delete_relay_service_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + entity_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a relay service connection by its name. + + Description for Deletes a relay service connection by its name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete a + hybrid connection for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_relay_service_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + + def update_relay_service_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + entity_name, # type: str + slot, # type: str + connection_envelope, # type: "_models.RelayServiceConnectionEntity" + **kwargs # type: Any + ): + # type: (...) -> "_models.RelayServiceConnectionEntity" + """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + + Description for Creates a new hybrid connection configuration (PUT), or updates an existing one + (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will create or + update a hybrid connection for the production slot. + :type slot: str + :param connection_envelope: Details of the hybrid connection configuration. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RelayServiceConnectionEntity, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RelayServiceConnectionEntity + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RelayServiceConnectionEntity"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_relay_service_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RelayServiceConnectionEntity', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + + def list_instance_identifiers_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebAppInstanceStatusCollection"] + """Gets all scale-out instances of an app. + + Description for Gets all scale-out instances of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API gets the + production slot instances. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebAppInstanceStatusCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppInstanceStatusCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_identifiers_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebAppInstanceStatusCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + + def get_instance_info_slot( + self, + resource_group_name, # type: str + name, # type: str + instance_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WebSiteInstanceStatus" + """Gets all scale-out instances of an app. + + Description for Gets all scale-out instances of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param instance_id: + :type instance_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API gets the + production slot instances. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebSiteInstanceStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebSiteInstanceStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebSiteInstanceStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_info_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebSiteInstanceStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + + def get_instance_ms_deploy_status_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MSDeployStatus" + """Get the status of the last MSDeploy operation. + + Description for Get the status of the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param instance_id: ID of web app instance. + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_ms_deploy_status_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + def _create_instance_ms_deploy_operation_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + instance_id, # type: str + ms_deploy, # type: "_models.MSDeploy" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MSDeployStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployStatus"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_instance_ms_deploy_operation_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + def begin_create_instance_ms_deploy_operation_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + instance_id, # type: str + ms_deploy, # type: "_models.MSDeploy" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MSDeployStatus"] + """Invoke the MSDeploy web app extension. + + Description for Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param instance_id: ID of web app instance. + :type instance_id: str + :param ms_deploy: Details of MSDeploy operation. + :type ms_deploy: ~azure.mgmt.web.v2020_12_01.models.MSDeploy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either MSDeployStatus or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_instance_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + instance_id=instance_id, + ms_deploy=ms_deploy, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MSDeployStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + + def get_instance_ms_deploy_log_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MSDeployLog"] + """Get the MSDeploy Log for the last MSDeploy operation. + + Description for Get the MSDeploy Log for the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param instance_id: ID of web app instance. + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSDeployLog, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MSDeployLog or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MSDeployLog"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_ms_deploy_log_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + + def list_instance_processes_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessInfoCollection"] + """Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + + Description for Get list of processes for a web site, or a deployment slot, or for a specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_processes_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + + def get_instance_process_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + slot, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProcessInfo"] + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + + def delete_instance_process_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + slot, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + + Description for Terminate a process by its ID for a web site, or a deployment slot, or specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_instance_process_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + + def get_instance_process_dump_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + slot, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional[IO] + """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + + Description for Get a memory dump of a process by its ID for a specific scaled-out instance in + a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process_dump_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + + def list_instance_process_modules_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + slot, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessModuleInfoCollection"] + """List module information for a process by its ID for a specific scaled-out instance in a web site. + + Description for List module information for a process by its ID for a specific scaled-out + instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessModuleInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_process_modules_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessModuleInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + + def get_instance_process_module_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + base_address, # type: str + slot, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProcessModuleInfo"] + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param base_address: Module base address. + :type base_address: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessModuleInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessModuleInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_instance_process_module_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'baseAddress': self._serialize.url("base_address", base_address, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + + def list_instance_process_threads_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + slot, # type: str + instance_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessThreadInfoCollection"] + """List the threads in a process by its ID for a specific scaled-out instance in a web site. + + Description for List the threads in a process by its ID for a specific scaled-out instance in a + web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the value of the name + property in the JSON response from "GET api/sites/{siteName}/instances". + :type instance_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessThreadInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_instance_process_threads_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessThreadInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + + def is_cloneable_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteCloneability" + """Shows whether an app can be cloned to another resource group or subscription. + + Description for Shows whether an app can be cloned to another resource group or subscription. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. By default, this API returns information on the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteCloneability, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteCloneability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteCloneability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.is_cloneable_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteCloneability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + + def list_site_backups_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BackupItemCollection"] + """Gets existing backups of an app. + + Description for Gets existing backups of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get backups + of the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupItemCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_backups_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BackupItemCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + + def list_sync_function_triggers_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.FunctionSecrets" + """This is to allow calling via powershell and ARM template. + + Description for This is to allow calling via powershell and ARM template. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FunctionSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.FunctionSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_sync_function_triggers_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FunctionSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + + def get_migrate_my_sql_status_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MigrateMySqlStatus" + """Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + + Description for Returns the status of MySql in app migration, if one is active, and whether or + not MySql in app is enabled. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MigrateMySqlStatus, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.MigrateMySqlStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MigrateMySqlStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_migrate_my_sql_status_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MigrateMySqlStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + + def get_swift_virtual_network_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SwiftVirtualNetwork" + """Gets a Swift Virtual Network connection. + + Description for Gets a Swift Virtual Network connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get a + gateway for the production slot's Virtual Network. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SwiftVirtualNetwork, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SwiftVirtualNetwork + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SwiftVirtualNetwork"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_swift_virtual_network_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SwiftVirtualNetwork', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + + def delete_swift_virtual_network_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a Swift Virtual Network connection from an app (or deployment slot). + + Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + connection for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_swift_virtual_network_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + + def list_network_features_slot( + self, + resource_group_name, # type: str + name, # type: str + view, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.NetworkFeatures"] + """Gets all network features used by the app (or deployment slot, if specified). + + Description for Gets all network features used by the app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param view: The type of view. Only "summary" is supported at this time. + :type view: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get network + features for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkFeatures, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.NetworkFeatures or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetworkFeatures"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_network_features_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'view': self._serialize.url("view", view, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkFeatures', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + + def get_network_trace_operation_slot( + self, + resource_group_name, # type: str + name, # type: str + operation_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get an + operation for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_trace_operation_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + + def start_web_site_network_trace_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + duration_in_seconds=None, # type: Optional[int] + max_frame_length=None, # type: Optional[int] + sas_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> str + """Start capturing network packets for the site (To be deprecated). + + Description for Start capturing network packets for the site (To be deprecated). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start_web_site_network_trace_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + + def _start_web_site_network_trace_operation_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + duration_in_seconds=None, # type: Optional[int] + max_frame_length=None, # type: Optional[int] + sas_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._start_web_site_network_trace_operation_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + + def begin_start_web_site_network_trace_operation_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + duration_in_seconds=None, # type: Optional[int] + max_frame_length=None, # type: Optional[int] + sas_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[List["_models.NetworkTrace"]] + """Start capturing network packets for the site. + + Description for Start capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_web_site_network_trace_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + + def stop_web_site_network_trace_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Stop ongoing capturing network packets for the site. + + Description for Stop ongoing capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_web_site_network_trace_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + + def get_network_traces_slot( + self, + resource_group_name, # type: str + name, # type: str + operation_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get an + operation for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_traces_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + + def get_network_trace_operation_slot_v2( + self, + resource_group_name, # type: str + name, # type: str + operation_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get an + operation for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_trace_operation_slot_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + + def get_network_traces_slot_v2( + self, + resource_group_name, # type: str + name, # type: str + operation_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + """Gets a named operation for a network trace capturing (or deployment slot, if specified). + + Description for Gets a named operation for a network trace capturing (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param operation_id: GUID of the operation. + :type operation_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get an + operation for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NetworkTrace, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_network_traces_slot_v2.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + + def generate_new_site_publishing_password_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Generates a new publishing password for an app (or deployment slot, if specified). + + Description for Generates a new publishing password for an app (or deployment slot, if + specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API generate a new + publishing password for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.generate_new_site_publishing_password_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + + def list_perf_mon_counters_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PerfMonCounterCollection"] + """Gets perfmon counters for web app. + + Description for Gets perfmon counters for web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param filter: Return only usages/metrics specified in the filter. Filter conforms to odata + syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z + and timeGrain eq duration'[Hour|Minute|Day]'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PerfMonCounterCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PerfMonCounterCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_perf_mon_counters_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PerfMonCounterCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + + def get_site_php_error_log_flag_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SitePhpErrorLogFlag" + """Gets web app's event logs. + + Description for Gets web app's event logs. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SitePhpErrorLogFlag, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SitePhpErrorLogFlag + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SitePhpErrorLogFlag"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_php_error_log_flag_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SitePhpErrorLogFlag', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + + def list_premier_add_ons_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PremierAddOn" + """Gets the premier add-ons of an app. + + Description for Gets the premier add-ons of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + premier add-ons for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_premier_add_ons_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + + def get_premier_add_on_slot( + self, + resource_group_name, # type: str + name, # type: str + premier_add_on_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PremierAddOn" + """Gets a named add-on of an app. + + Description for Gets a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + named add-on for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_premier_add_on_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + + def add_premier_add_on_slot( + self, + resource_group_name, # type: str + name, # type: str + premier_add_on_name, # type: str + slot, # type: str + premier_add_on, # type: "_models.PremierAddOn" + **kwargs # type: Any + ): + # type: (...) -> "_models.PremierAddOn" + """Updates a named add-on of an app. + + Description for Updates a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + named add-on for the production slot. + :type slot: str + :param premier_add_on: A JSON representation of the edited premier add-on. + :type premier_add_on: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.add_premier_add_on_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + + def delete_premier_add_on_slot( + self, + resource_group_name, # type: str + name, # type: str + premier_add_on_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a premier add-on from an app. + + Description for Delete a premier add-on from an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + named add-on for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_premier_add_on_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + + def update_premier_add_on_slot( + self, + resource_group_name, # type: str + name, # type: str + premier_add_on_name, # type: str + slot, # type: str + premier_add_on, # type: "_models.PremierAddOnPatchResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.PremierAddOn" + """Updates a named add-on of an app. + + Description for Updates a named add-on of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + named add-on for the production slot. + :type slot: str + :param premier_add_on: A JSON representation of the edited premier add-on. + :type premier_add_on: ~azure.mgmt.web.v2020_12_01.models.PremierAddOnPatchResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PremierAddOn, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PremierAddOn + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOn"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_premier_add_on_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PremierAddOn', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + + def get_private_access_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateAccess" + """Gets data around private site access enablement and authorized Virtual Networks that can access the site. + + Description for Gets data around private site access enablement and authorized Virtual Networks + that can access the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for the web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateAccess, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateAccess"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_access_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + + def put_private_access_vnet_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + access, # type: "_models.PrivateAccess" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateAccess" + """Sets data around private site access enablement and authorized Virtual Networks that can access the site. + + Description for Sets data around private site access enablement and authorized Virtual Networks + that can access the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for the web app. + :type slot: str + :param access: The information for the private access. + :type access: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateAccess, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateAccess + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateAccess"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put_private_access_vnet_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(access, 'PrivateAccess') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + + def get_private_endpoint_connection_list_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionCollection"] + """Gets the list of private endpoint connections associated with a site. + + Description for Gets the list of private endpoint connections associated with a site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param slot: Name of the site deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_private_endpoint_connection_list_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} # type: ignore + + def get_private_endpoint_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RemotePrivateEndpointConnectionARMResource" + """Gets a private endpoint connection. + + Description for Gets a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param slot: Name of the site deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RemotePrivateEndpointConnectionARMResource, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_endpoint_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _approve_or_reject_private_endpoint_connection_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + slot, # type: str + private_endpoint_wrapper, # type: "_models.PrivateLinkConnectionApprovalRequestResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.RemotePrivateEndpointConnectionARMResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._approve_or_reject_private_endpoint_connection_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_approve_or_reject_private_endpoint_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + slot, # type: str + private_endpoint_wrapper, # type: "_models.PrivateLinkConnectionApprovalRequestResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"] + """Approves or rejects a private endpoint connection. + + Description for Approves or rejects a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param slot: + :type slot: str + :param private_endpoint_wrapper: + :type private_endpoint_wrapper: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkConnectionApprovalRequestResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either RemotePrivateEndpointConnectionARMResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._approve_or_reject_private_endpoint_connection_slot_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + slot=slot, + private_endpoint_wrapper=private_endpoint_wrapper, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RemotePrivateEndpointConnectionARMResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_private_endpoint_connection_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> object + cls = kwargs.pop('cls', None) # type: ClsType[object] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_private_endpoint_connection_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('object', pipeline_response) + + if response.status_code == 204: + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete_private_endpoint_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[object] + """Deletes a private endpoint connection. + + Description for Deletes a private endpoint connection. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either object or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[object] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[object] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_private_endpoint_connection_slot_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + slot=slot, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def get_private_link_resources_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesWrapper" + """Gets the private link resources. + + Description for Gets the private link resources. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the site. + :type name: str + :param slot: + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesWrapper, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PrivateLinkResourcesWrapper + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesWrapper"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_private_link_resources_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesWrapper', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} # type: ignore + + def list_processes_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessInfoCollection"] + """Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + + Description for Get list of processes for a web site, or a deployment slot, or for a specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_processes_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + + def get_process_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProcessInfo"] + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + + def delete_process_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + + Description for Terminate a process by its ID for a web site, or a deployment slot, or specific + scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_process_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + + def get_process_dump_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional[IO] + """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + + Description for Get a memory dump of a process by its ID for a specific scaled-out instance in + a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[IO]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process_dump_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + + def list_process_modules_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessModuleInfoCollection"] + """List module information for a process by its ID for a specific scaled-out instance in a web site. + + Description for List module information for a process by its ID for a specific scaled-out + instance in a web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessModuleInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_process_modules_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessModuleInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + + def get_process_module_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + base_address, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProcessModuleInfo"] + """Get process information by its ID for a specific scaled-out instance in a web site. + + Description for Get process information by its ID for a specific scaled-out instance in a web + site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param base_address: Module base address. + :type base_address: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProcessModuleInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProcessModuleInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_process_module_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'baseAddress': self._serialize.url("base_address", base_address, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProcessModuleInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + + def list_process_threads_slot( + self, + resource_group_name, # type: str + name, # type: str + process_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProcessThreadInfoCollection"] + """List the threads in a process by its ID for a specific scaled-out instance in a web site. + + Description for List the threads in a process by its ID for a specific scaled-out instance in a + web site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProcessThreadInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_process_threads_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProcessThreadInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + + def list_public_certificates_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PublicCertificateCollection"] + """Get public certificates for an app or a deployment slot. + + Description for Get public certificates for an app or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API gets hostname + bindings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicCertificateCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificateCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_public_certificates_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PublicCertificateCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + + def get_public_certificate_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + public_certificate_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PublicCertificate" + """Get the named public certificate for an app (or deployment slot, if specified). + + Description for Get the named public certificate for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API the named binding + for the production slot. + :type slot: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_public_certificate_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + + def create_or_update_public_certificate_slot( + self, + resource_group_name, # type: str + name, # type: str + public_certificate_name, # type: str + slot, # type: str + public_certificate, # type: "_models.PublicCertificate" + **kwargs # type: Any + ): + # type: (...) -> "_models.PublicCertificate" + """Creates a hostname binding for an app. + + Description for Creates a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will create a + binding for the production slot. + :type slot: str + :param public_certificate: Public certificate details. This is the JSON representation of a + PublicCertificate object. + :type public_certificate: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.PublicCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_public_certificate_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + + def delete_public_certificate_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + public_certificate_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a hostname binding for an app. + + Description for Deletes a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + binding for the production slot. + :type slot: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_public_certificate_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + + def list_publishing_profile_xml_with_secrets_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + publishing_profile_options, # type: "_models.CsmPublishingProfileOptions" + **kwargs # type: Any + ): + # type: (...) -> IO + """Gets the publishing profile for an app (or deployment slot, if specified). + + Description for Gets the publishing profile for an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + publishing profile for the production slot. + :type slot: str + :param publishing_profile_options: Specifies publishingProfileOptions for publishing profile. + For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + :type publishing_profile_options: ~azure.mgmt.web.v2020_12_01.models.CsmPublishingProfileOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IO, or the result of cls(response) + :rtype: IO + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[IO] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/xml" + + # Construct URL + url = self.list_publishing_profile_xml_with_secrets_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = response.stream_download(self._client._pipeline) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + + def reset_slot_configuration_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + + Description for Resets the configuration settings of the current slot if they were previously + modified by calling the API with POST. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API resets + configuration settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.reset_slot_configuration_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + + def restart_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + soft_restart=None, # type: Optional[bool] + synchronous=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Restarts an app (or deployment slot, if specified). + + Description for Restarts an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will restart the + production slot. + :type slot: str + :param soft_restart: Specify true to apply the configuration settings and restarts the app only + if necessary. By default, the API always restarts and reprovisions the app. + :type soft_restart: bool + :param synchronous: Specify true to block until the app is restarted. By default, it is set to + false, and the API responds immediately (asynchronous). + :type synchronous: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.restart_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + if synchronous is not None: + query_parameters['synchronous'] = self._serialize.query("synchronous", synchronous, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + + def _restore_from_backup_blob_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + request, # type: "_models.RestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_from_backup_blob_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'RestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + + def begin_restore_from_backup_blob_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + request, # type: "_models.RestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restores an app from a backup blob in Azure Storage. + + Description for Restores an app from a backup blob in Azure Storage. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will restore a + backup of the production slot. + :type slot: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.v2020_12_01.models.RestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restore_from_backup_blob_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + + def _restore_from_deleted_app_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + restore_request, # type: "_models.DeletedAppRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_from_deleted_app_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + + def begin_restore_from_deleted_app_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + restore_request, # type: "_models.DeletedAppRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restores a deleted web app to this web app. + + Description for Restores a deleted web app to this web app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param restore_request: Deleted web app restore information. + :type restore_request: ~azure.mgmt.web.v2020_12_01.models.DeletedAppRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restore_from_deleted_app_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + restore_request=restore_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + + def _restore_snapshot_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + restore_request, # type: "_models.SnapshotRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restore_snapshot_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(restore_request, 'SnapshotRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + + def begin_restore_snapshot_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + restore_request, # type: "_models.SnapshotRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restores a web app from a snapshot. + + Description for Restores a web app from a snapshot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :param restore_request: Snapshot restore settings. Snapshot information can be obtained by + calling GetDeletedSites or GetSiteSnapshots API. + :type restore_request: ~azure.mgmt.web.v2020_12_01.models.SnapshotRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restore_snapshot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + restore_request=restore_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + + def list_site_extensions_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SiteExtensionInfoCollection"] + """Get list of siteextensions for a web site, or a deployment slot. + + Description for Get list of siteextensions for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SiteExtensionInfoCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_extensions_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SiteExtensionInfoCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + + def get_site_extension_slot( + self, + resource_group_name, # type: str + name, # type: str + site_extension_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.SiteExtensionInfo"] + """Get site extension information by its ID for a web site, or a deployment slot. + + Description for Get site extension information by its ID for a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteExtensionInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SiteExtensionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_site_extension_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + + def _install_site_extension_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + site_extension_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.SiteExtensionInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SiteExtensionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._install_site_extension_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.put(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 429]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + + def begin_install_site_extension_slot( + self, + resource_group_name, # type: str + name, # type: str + site_extension_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.SiteExtensionInfo"] + """Install site extension on a web site, or a deployment slot. + + Description for Install site extension on a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either SiteExtensionInfo or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._install_site_extension_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + slot=slot, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SiteExtensionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + + def delete_site_extension_slot( + self, + resource_group_name, # type: str + name, # type: str + site_extension_id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove a site extension from a web site, or a deployment slot. + + Description for Remove a site extension from a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_site_extension_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + + def list_slot_differences_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + slot_swap_entity, # type: "_models.CsmSlotEntity" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SlotDifferenceCollection"] + """Get the difference in configuration settings between two web app slots. + + Description for Get the difference in configuration settings between two web app slots. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the source slot. If a slot is not specified, the production slot is used + as the source slot. + :type slot: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SlotDifferenceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SlotDifferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_slot_differences_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SlotDifferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + + def _swap_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + slot_swap_entity, # type: "_models.CsmSlotEntity" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._swap_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + + def begin_swap_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + slot_swap_entity, # type: "_models.CsmSlotEntity" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Swaps two deployment slots of an app. + + Description for Swaps two deployment slots of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the source slot. If a slot is not specified, the production slot is used + as the source slot. + :type slot: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._swap_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + slot_swap_entity=slot_swap_entity, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + + def list_snapshots_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SnapshotCollection"] + """Returns all Snapshots to the user. + + Description for Returns all Snapshots to the user. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Website Name. + :type name: str + :param slot: Website Slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_snapshots_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + + def list_snapshots_from_dr_secondary_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SnapshotCollection"] + """Returns all Snapshots to the user from DRSecondary endpoint. + + Description for Returns all Snapshots to the user from DRSecondary endpoint. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Website Name. + :type name: str + :param slot: Website Slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + + def get_source_control_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteSourceControl" + """Gets the source control configuration of an app. + + Description for Gets the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + source control configuration for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteSourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_source_control_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + + def _create_or_update_source_control_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_source_control, # type: "_models.SiteSourceControl" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteSourceControl" + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_source_control_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + + def begin_create_or_update_source_control_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_source_control, # type: "_models.SiteSourceControl" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.SiteSourceControl"] + """Updates the source control configuration of an app. + + Description for Updates the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + source control configuration for the production slot. + :type slot: str + :param site_source_control: JSON representation of a SiteSourceControl object. See example. + :type site_source_control: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_source_control_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + site_source_control=site_source_control, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + + def delete_source_control_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + additional_flags=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the source control configuration of an app. + + Description for Deletes the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + source control configuration for the production slot. + :type slot: str + :param additional_flags: + :type additional_flags: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_source_control_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if additional_flags is not None: + query_parameters['additionalFlags'] = self._serialize.query("additional_flags", additional_flags, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + + def update_source_control_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + site_source_control, # type: "_models.SiteSourceControl" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteSourceControl" + """Updates the source control configuration of an app. + + Description for Updates the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will update the + source control configuration for the production slot. + :type slot: str + :param site_source_control: JSON representation of a SiteSourceControl object. See example. + :type site_source_control: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteSourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_source_control_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + + def start_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Starts an app (or deployment slot, if specified). + + Description for Starts an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will start the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + + def _start_network_trace_slot_initial( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + duration_in_seconds=None, # type: Optional[int] + max_frame_length=None, # type: Optional[int] + sas_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._start_network_trace_slot_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + + def begin_start_network_trace_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + duration_in_seconds=None, # type: Optional[int] + max_frame_length=None, # type: Optional[int] + sas_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[List["_models.NetworkTrace"]] + """Start capturing network packets for the site. + + Description for Start capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_network_trace_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + + def stop_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Stops an app (or deployment slot, if specified). + + Description for Stops an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will stop the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + + def stop_network_trace_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Stop ongoing capturing network packets for the site. + + Description for Stop ongoing capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_network_trace_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + + def sync_repository_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Sync web app repository. + + Description for Sync web app repository. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default to production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_repository_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + + def sync_function_triggers_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Syncs function trigger metadata to the management database. + + Description for Syncs function trigger metadata to the management database. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_function_triggers_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + + def list_triggered_web_jobs_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.TriggeredWebJobCollection"] + """List triggered web jobs for an app, or a deployment slot. + + Description for List triggered web jobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes a + deployment for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TriggeredWebJobCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TriggeredWebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + + def get_triggered_web_job_slot( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.TriggeredWebJob"] + """Gets a triggered web job by its ID for an app, or a deployment slot. + + Description for Gets a triggered web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TriggeredWebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TriggeredWebJob"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_triggered_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + + def delete_triggered_web_job_slot( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a triggered web job by its ID for an app, or a deployment slot. + + Description for Delete a triggered web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API deletes web job + for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_triggered_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + + def list_triggered_web_job_history_slot( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.TriggeredJobHistoryCollection"] + """List a triggered web job's history for an app, or a deployment slot. + + Description for List a triggered web job's history for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TriggeredJobHistoryCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TriggeredJobHistoryCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + + def get_triggered_web_job_history_slot( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + id, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.TriggeredJobHistory"] + """Gets a triggered web job's history by its ID for an app, , or a deployment slot. + + Description for Gets a triggered web job's history by its ID for an app, , or a deployment + slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param id: History ID. + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TriggeredJobHistory, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TriggeredJobHistory"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_triggered_web_job_history_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + + def run_triggered_web_job_slot( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Run a triggered web job for an app, or a deployment slot. + + Description for Run a triggered web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API uses the + production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.run_triggered_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + + def list_usages_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CsmUsageQuotaCollection"] + """Gets the quota usage information of an app (or deployment slot, if specified). + + Description for Gets the quota usage information of an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get quota + information of the production slot. + :type slot: str + :param filter: Return only information specified in the filter (using OData syntax). For + example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq + 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + duration'[Hour|Minute|Day]'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmUsageQuotaCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_usages_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CsmUsageQuotaCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + + def list_vnet_connections_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.VnetInfo"] + """Gets the virtual networks the app (or deployment slot) is connected to. + + Description for Gets the virtual networks the app (or deployment slot) is connected to. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get virtual + network connections for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of VnetInfo, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.VnetInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_vnet_connections_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[VnetInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + + def get_vnet_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetInfo" + """Gets a virtual network the app (or deployment slot) is connected to by name. + + Description for Gets a virtual network the app (or deployment slot) is connected to by name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the virtual network. + :type vnet_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + named virtual network for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + + def create_or_update_vnet_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + slot, # type: str + connection_envelope, # type: "_models.VnetInfo" + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetInfo" + """Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + + Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the + connection properties (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of an existing Virtual Network. + :type vnet_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will add or + update connections for the production slot. + :type slot: str + :param connection_envelope: Properties of the Virtual Network connection. See example. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_vnet_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + + def delete_vnet_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a connection from an app (or deployment slot to a named virtual network. + + Description for Deletes a connection from an app (or deployment slot to a named virtual + network. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the virtual network. + :type vnet_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the + connection for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_vnet_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + + def update_vnet_connection_slot( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + slot, # type: str + connection_envelope, # type: "_models.VnetInfo" + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetInfo" + """Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + + Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the + connection properties (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of an existing Virtual Network. + :type vnet_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will add or + update connections for the production slot. + :type slot: str + :param connection_envelope: Properties of the Virtual Network connection. See example. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_connection_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + + def get_vnet_connection_gateway_slot( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + gateway_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VnetGateway"] + """Gets an app's Virtual Network gateway. + + Description for Gets an app's Virtual Network gateway. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get a + gateway for the production slot's Virtual Network. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VnetGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_connection_gateway_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + def create_or_update_vnet_connection_gateway_slot( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + gateway_name, # type: str + slot, # type: str + connection_envelope, # type: "_models.VnetGateway" + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetGateway" + """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will add or + update a gateway for the production slot's Virtual Network. + :type slot: str + :param connection_envelope: The properties to update this gateway with. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + def update_vnet_connection_gateway_slot( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + gateway_name, # type: str + slot, # type: str + connection_envelope, # type: "_models.VnetGateway" + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetGateway" + """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will add or + update a gateway for the production slot's Virtual Network. + :type slot: str + :param connection_envelope: The properties to update this gateway with. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_connection_gateway_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + def list_web_jobs_slot( + self, + resource_group_name, # type: str + name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebJobCollection"] + """List webjobs for an app, or a deployment slot. + + Description for List webjobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebJobCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_jobs_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + + def get_web_job_slot( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + slot, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WebJob" + """Get webjob information for an app, or a deployment slot. + + Description for Get webjob information for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of the web job. + :type web_job_name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API returns + deployments for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebJob + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJob"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_web_job_slot.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + + def list_slot_differences_from_production( + self, + resource_group_name, # type: str + name, # type: str + slot_swap_entity, # type: "_models.CsmSlotEntity" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SlotDifferenceCollection"] + """Get the difference in configuration settings between two web app slots. + + Description for Get the difference in configuration settings between two web app slots. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SlotDifferenceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SlotDifferenceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_slot_differences_from_production.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SlotDifferenceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + + def _swap_slot_with_production_initial( + self, + resource_group_name, # type: str + name, # type: str + slot_swap_entity, # type: "_models.CsmSlotEntity" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._swap_slot_with_production_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + + def begin_swap_slot_with_production( + self, + resource_group_name, # type: str + name, # type: str + slot_swap_entity, # type: "_models.CsmSlotEntity" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Swaps two deployment slots of an app. + + Description for Swaps two deployment slots of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot_swap_entity: JSON object that contains the target slot name. See example. + :type slot_swap_entity: ~azure.mgmt.web.v2020_12_01.models.CsmSlotEntity + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._swap_slot_with_production_initial( + resource_group_name=resource_group_name, + name=name, + slot_swap_entity=slot_swap_entity, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + + def list_snapshots( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SnapshotCollection"] + """Returns all Snapshots to the user. + + Description for Returns all Snapshots to the user. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Website Name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_snapshots.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + + def list_snapshots_from_dr_secondary( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SnapshotCollection"] + """Returns all Snapshots to the user from DRSecondary endpoint. + + Description for Returns all Snapshots to the user from DRSecondary endpoint. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Website Name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + + def get_source_control( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteSourceControl" + """Gets the source control configuration of an app. + + Description for Gets the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteSourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_source_control.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + + def _create_or_update_source_control_initial( + self, + resource_group_name, # type: str + name, # type: str + site_source_control, # type: "_models.SiteSourceControl" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteSourceControl" + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_source_control_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + + def begin_create_or_update_source_control( + self, + resource_group_name, # type: str + name, # type: str + site_source_control, # type: "_models.SiteSourceControl" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.SiteSourceControl"] + """Updates the source control configuration of an app. + + Description for Updates the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param site_source_control: JSON representation of a SiteSourceControl object. See example. + :type site_source_control: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either SiteSourceControl or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_source_control_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + + def delete_source_control( + self, + resource_group_name, # type: str + name, # type: str + additional_flags=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the source control configuration of an app. + + Description for Deletes the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param additional_flags: + :type additional_flags: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_source_control.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if additional_flags is not None: + query_parameters['additionalFlags'] = self._serialize.query("additional_flags", additional_flags, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + + def update_source_control( + self, + resource_group_name, # type: str + name, # type: str + site_source_control, # type: "_models.SiteSourceControl" + **kwargs # type: Any + ): + # type: (...) -> "_models.SiteSourceControl" + """Updates the source control configuration of an app. + + Description for Updates the source control configuration of an app. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param site_source_control: JSON representation of a SiteSourceControl object. See example. + :type site_source_control: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteSourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SiteSourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_source_control.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(site_source_control, 'SiteSourceControl') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + + def start( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Starts an app (or deployment slot, if specified). + + Description for Starts an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.start.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + + def _start_network_trace_initial( + self, + resource_group_name, # type: str + name, # type: str + duration_in_seconds=None, # type: Optional[int] + max_frame_length=None, # type: Optional[int] + sas_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> List["_models.NetworkTrace"] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._start_network_trace_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + + def begin_start_network_trace( + self, + resource_group_name, # type: str + name, # type: str + duration_in_seconds=None, # type: Optional[int] + max_frame_length=None, # type: Optional[int] + sas_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[List["_models.NetworkTrace"]] + """Start capturing network packets for the site. + + Description for Start capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either list of NetworkTrace or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_network_trace_initial( + resource_group_name=resource_group_name, + name=name, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('[NetworkTrace]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + + def stop( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Stops an app (or deployment slot, if specified). + + Description for Stops an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + + def stop_network_trace( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Stop ongoing capturing network packets for the site. + + Description for Stop ongoing capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.stop_network_trace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + + def sync_repository( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Sync web app repository. + + Description for Sync web app repository. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_repository.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + + def sync_function_triggers( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Syncs function trigger metadata to the management database. + + Description for Syncs function trigger metadata to the management database. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.sync_function_triggers.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + + def list_triggered_web_jobs( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.TriggeredWebJobCollection"] + """List triggered web jobs for an app, or a deployment slot. + + Description for List triggered web jobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TriggeredWebJobCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_triggered_web_jobs.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TriggeredWebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + + def get_triggered_web_job( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.TriggeredWebJob"] + """Gets a triggered web job by its ID for an app, or a deployment slot. + + Description for Gets a triggered web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TriggeredWebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredWebJob or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TriggeredWebJob"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_triggered_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredWebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + + def delete_triggered_web_job( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a triggered web job by its ID for an app, or a deployment slot. + + Description for Delete a triggered web job by its ID for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_triggered_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + + def list_triggered_web_job_history( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.TriggeredJobHistoryCollection"] + """List a triggered web job's history for an app, or a deployment slot. + + Description for List a triggered web job's history for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TriggeredJobHistoryCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryCollectionor None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_triggered_web_job_history.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TriggeredJobHistoryCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + + def get_triggered_web_job_history( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.TriggeredJobHistory"] + """Gets a triggered web job's history by its ID for an app, , or a deployment slot. + + Description for Gets a triggered web job's history by its ID for an app, , or a deployment + slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :param id: History ID. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TriggeredJobHistory, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistory or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TriggeredJobHistory"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_triggered_web_job_history.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'id': self._serialize.url("id", id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggeredJobHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + + def run_triggered_web_job( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Run a triggered web job for an app, or a deployment slot. + + Description for Run a triggered web job for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of Web Job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.run_triggered_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + + def list_usages( + self, + resource_group_name, # type: str + name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CsmUsageQuotaCollection"] + """Gets the quota usage information of an app (or deployment slot, if specified). + + Description for Gets the quota usage information of an app (or deployment slot, if specified). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param filter: Return only information specified in the filter (using OData syntax). For + example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq + 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + duration'[Hour|Minute|Day]'. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CsmUsageQuotaCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_usages.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CsmUsageQuotaCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + + def list_vnet_connections( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> List["_models.VnetInfo"] + """Gets the virtual networks the app (or deployment slot) is connected to. + + Description for Gets the virtual networks the app (or deployment slot) is connected to. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of VnetInfo, or the result of cls(response) + :rtype: list[~azure.mgmt.web.v2020_12_01.models.VnetInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.VnetInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_vnet_connections.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[VnetInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + + def get_vnet_connection( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetInfo" + """Gets a virtual network the app (or deployment slot) is connected to by name. + + Description for Gets a virtual network the app (or deployment slot) is connected to by name. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the virtual network. + :type vnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + + def create_or_update_vnet_connection( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + connection_envelope, # type: "_models.VnetInfo" + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetInfo" + """Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + + Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the + connection properties (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of an existing Virtual Network. + :type vnet_name: str + :param connection_envelope: Properties of the Virtual Network connection. See example. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_vnet_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + + def delete_vnet_connection( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a connection from an app (or deployment slot to a named virtual network. + + Description for Deletes a connection from an app (or deployment slot to a named virtual + network. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the virtual network. + :type vnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete_vnet_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + + def update_vnet_connection( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + connection_envelope, # type: "_models.VnetInfo" + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetInfo" + """Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + + Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the + connection properties (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of an existing Virtual Network. + :type vnet_name: str + :param connection_envelope: Properties of the Virtual Network connection. See example. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetInfo, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetInfo') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + + def get_vnet_connection_gateway( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VnetGateway"] + """Gets an app's Virtual Network gateway. + + Description for Gets an app's Virtual Network gateway. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VnetGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_vnet_connection_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + def create_or_update_vnet_connection_gateway( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + gateway_name, # type: str + connection_envelope, # type: "_models.VnetGateway" + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetGateway" + """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :param connection_envelope: The properties to update this gateway with. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_vnet_connection_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + def update_vnet_connection_gateway( + self, + resource_group_name, # type: str + name, # type: str + vnet_name, # type: str + gateway_name, # type: str + connection_envelope, # type: "_models.VnetGateway" + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetGateway" + """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param vnet_name: Name of the Virtual Network. + :type vnet_name: str + :param gateway_name: Name of the gateway. Currently, the only supported string is "primary". + :type gateway_name: str + :param connection_envelope: The properties to update this gateway with. + :type connection_envelope: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetGateway, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_vnet_connection_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection_envelope, 'VnetGateway') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + + def list_web_jobs( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebJobCollection"] + """List webjobs for an app, or a deployment slot. + + Description for List webjobs for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebJobCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_web_jobs.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + + def get_web_job( + self, + resource_group_name, # type: str + name, # type: str + web_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WebJob" + """Get webjob information for an app, or a deployment slot. + + Description for Get webjob information for an app, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param web_job_name: Name of the web job. + :type web_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebJob, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.WebJob + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJob"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_web_job.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'webJobName': self._serialize.url("web_job_name", web_job_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_site_management_client_operations.py new file mode 100644 index 000000000000..8a9a31bd869a --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_site_management_client_operations.py @@ -0,0 +1,1142 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WebSiteManagementClientOperationsMixin(object): + + def generate_github_access_token_for_appservice_cli_async( + self, + code, # type: str + state, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AppserviceGithubToken" + """Exchange code for GitHub access token for AppService CLI. + + Description for Exchange code for GitHub access token for AppService CLI. + + :param code: Code string to exchange for Github Access token. + :type code: str + :param state: State string used for verification. + :type state: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AppserviceGithubToken, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.AppserviceGithubToken + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppserviceGithubToken"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + _request = _models.AppserviceGithubTokenRequest(code=code, state=state) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.generate_github_access_token_for_appservice_cli_async.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_request, 'AppserviceGithubTokenRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AppserviceGithubToken', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + generate_github_access_token_for_appservice_cli_async.metadata = {'url': '/providers/Microsoft.Web/generateGithubAccessTokenForAppserviceCLI'} # type: ignore + + def get_publishing_user( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.User" + """Gets publishing user. + + Description for Gets publishing user. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: User, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.User + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_publishing_user.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + + def update_publishing_user( + self, + user_details, # type: "_models.User" + **kwargs # type: Any + ): + # type: (...) -> "_models.User" + """Updates publishing user. + + Description for Updates publishing user. + + :param user_details: Details of publishing user. + :type user_details: ~azure.mgmt.web.v2020_12_01.models.User + :keyword callable cls: A custom type or function that will be passed the direct response + :return: User, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.User + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_publishing_user.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(user_details, 'User') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('User', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + + def list_source_controls( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SourceControlCollection"] + """Gets the source controls available for Azure websites. + + Description for Gets the source controls available for Azure websites. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SourceControlCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_source_controls.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SourceControlCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + + def get_source_control( + self, + source_control_type, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SourceControl" + """Gets source control token. + + Description for Gets source control token. + + :param source_control_type: Type of source control. + :type source_control_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_source_control.metadata['url'] # type: ignore + path_format_arguments = { + 'sourceControlType': self._serialize.url("source_control_type", source_control_type, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + + def update_source_control( + self, + source_control_type, # type: str + request_message, # type: "_models.SourceControl" + **kwargs # type: Any + ): + # type: (...) -> "_models.SourceControl" + """Updates source control token. + + Description for Updates source control token. + + :param source_control_type: Type of source control. + :type source_control_type: str + :param request_message: Source control token information. + :type request_message: ~azure.mgmt.web.v2020_12_01.models.SourceControl + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SourceControl, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_source_control.metadata['url'] # type: ignore + path_format_arguments = { + 'sourceControlType': self._serialize.url("source_control_type", source_control_type, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request_message, 'SourceControl') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SourceControl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + + def list_billing_meters( + self, + billing_location=None, # type: Optional[str] + os_type=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BillingMeterCollection"] + """Gets a list of meters for a given location. + + Description for Gets a list of meters for a given location. + + :param billing_location: Azure Location of billable resource. + :type billing_location: str + :param os_type: App Service OS type meters used for. + :type os_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BillingMeterCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_billing_meters.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if billing_location is not None: + query_parameters['billingLocation'] = self._serialize.query("billing_location", billing_location, 'str') + if os_type is not None: + query_parameters['osType'] = self._serialize.query("os_type", os_type, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BillingMeterCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + + def check_name_availability( + self, + name, # type: str + type, # type: Union[str, "_models.CheckNameResourceTypes"] + is_fqdn=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceNameAvailability" + """Check if a resource name is available. + + Description for Check if a resource name is available. + + :param name: Resource name to verify. + :type name: str + :param type: Resource type used for verification. + :type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes + :param is_fqdn: Is fully qualified domain name. + :type is_fqdn: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceNameAvailability, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceNameAvailability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_request, 'ResourceNameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceNameAvailability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + + def get_subscription_deployment_locations( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.DeploymentLocations" + """Gets list of available geo regions plus ministamps. + + Description for Gets list of available geo regions plus ministamps. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentLocations, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentLocations"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_subscription_deployment_locations.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeploymentLocations', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + + def list_geo_regions( + self, + sku=None, # type: Optional[Union[str, "_models.SkuName"]] + linux_workers_enabled=None, # type: Optional[bool] + xenon_workers_enabled=None, # type: Optional[bool] + linux_dynamic_workers_enabled=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.GeoRegionCollection"] + """Get a list of available geographical regions. + + Description for Get a list of available geographical regions. + + :param sku: Name of SKU used to filter the regions. + :type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName + :param linux_workers_enabled: Specify :code:`true` if you want to filter to only + regions that support Linux workers. + :type linux_workers_enabled: bool + :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only + regions that support Xenon workers. + :type xenon_workers_enabled: bool + :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter + to only regions that support Linux Consumption Workers. + :type linux_dynamic_workers_enabled: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_geo_regions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if sku is not None: + query_parameters['sku'] = self._serialize.query("sku", sku, 'str') + if linux_workers_enabled is not None: + query_parameters['linuxWorkersEnabled'] = self._serialize.query("linux_workers_enabled", linux_workers_enabled, 'bool') + if xenon_workers_enabled is not None: + query_parameters['xenonWorkersEnabled'] = self._serialize.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + if linux_dynamic_workers_enabled is not None: + query_parameters['linuxDynamicWorkersEnabled'] = self._serialize.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('GeoRegionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + + def list_site_identifiers_assigned_to_host_name( + self, + name_identifier, # type: "_models.NameIdentifier" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.IdentifierCollection"] + """List all apps that are assigned to a hostname. + + Description for List all apps that are assigned to a hostname. + + :param name_identifier: Hostname information. + :type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IdentifierCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_site_identifiers_assigned_to_host_name.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(name_identifier, 'NameIdentifier') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('IdentifierCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + + def list_premier_add_on_offers( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PremierAddOnOfferCollection"] + """List all premier add-on offers. + + Description for List all premier add-on offers. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PremierAddOnOfferCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_premier_add_on_offers.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PremierAddOnOfferCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + + def list_skus( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.SkuInfos" + """List all SKUs. + + Description for List all SKUs. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SkuInfos, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfos"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SkuInfos', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + + def verify_hosting_environment_vnet( + self, + parameters, # type: "_models.VnetParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.VnetValidationFailureDetails" + """Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + + Description for Verifies if this VNET is compatible with an App Service Environment by + analyzing the Network Security Group rules. + + :param parameters: VNET information. + :type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VnetValidationFailureDetails, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VnetValidationFailureDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.verify_hosting_environment_vnet.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VnetParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VnetValidationFailureDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + + def move( + self, + resource_group_name, # type: str + move_resource_envelope, # type: "_models.CsmMoveResourceEnvelope" + **kwargs # type: Any + ): + # type: (...) -> None + """Move resources between resource groups. + + Description for Move resources between resource groups. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param move_resource_envelope: Object that represents the resource to move. + :type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.move.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + + def validate( + self, + resource_group_name, # type: str + validate_request, # type: "_models.ValidateRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidateResponse" + """Validate if a resource can be created. + + Description for Validate if a resource can be created. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param validate_request: Request with the resources to validate. + :type validate_request: ~azure.mgmt.web.v2020_12_01.models.ValidateRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidateResponse, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(validate_request, 'ValidateRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidateResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + + def validate_move( + self, + resource_group_name, # type: str + move_resource_envelope, # type: "_models.CsmMoveResourceEnvelope" + **kwargs # type: Any + ): + # type: (...) -> None + """Validate whether a resource can be moved. + + Description for Validate whether a resource can be moved. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param move_resource_envelope: Object that represents the resource to move. + :type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.validate_move.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/py.typed b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file